Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/cd-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: './public'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5
61 changes: 61 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: CI

on:
push:
branches:
- main
# - dev
pull_request:
branches:
- main
# - dev
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
static-site-checks:
name: Static site checks
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
cache: npm

- name: Install dependencies
run: npm ci

- name: Run unit tests
run: npm test

# TODO: Re-enable formatting check once we have a consistent style and a formatter in place.
# Prettier formatting
# - name: Check formatting
# run: npm run format:check

- name: Lint JavaScript
run: npm run lint:js

# TODO: Re-enable HTML validation once we have a consistent style and the necessary configuration in place.
# html-validate
# - name: Validate HTML
# run: npm run lint:html

- name: Verify public site files exist
run: |
test -f public/index.html
test -d public/assets

- name: Check links
run: npm run check:links
153 changes: 0 additions & 153 deletions assets/css/style.css

This file was deleted.

29 changes: 0 additions & 29 deletions assets/js/script.js

This file was deleted.

45 changes: 45 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
export default [
{
ignores: [
"node_modules/**",
"dist/**",
"coverage/**",
"public/vendor/**",
],
},
{
files: [
"public/assets/js/**/*.js",
"tests/**/*.js",
],
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
globals: {
document: "readonly",
window: "readonly",
Event: "readonly",
MouseEvent: "readonly",
console: "readonly",
URL: "readonly",
process: "readonly",
},
},
rules: {
"no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
},
],
"no-undef": "error",
"no-console": "warn",
"prefer-const": "error",
"eqeqeq": [
"error",
"always",
],
},
},
];
Loading
Loading