Skip to content

[WIP] Add package-lock.json for deterministic dependency installation #12

[WIP] Add package-lock.json for deterministic dependency installation

[WIP] Add package-lock.json for deterministic dependency installation #12

Workflow file for this run

name: CI / Deploy to GitHub Pages
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
# ── Validate ─────────────────────────────────────────────────
validate:
name: Validate HTML & JS
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install validators
run: npm install -g html-validate
- name: Validate HTML
run: html-validate index.html
# ── Deploy (only on push to main) ────────────────────────────
deploy:
name: Deploy to GitHub Pages
needs: validate
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure GitHub Pages
uses: actions/configure-pages@v4
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
# Deploy everything in the repo root
path: '.'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4