Files
spark/.github/workflows/deploy-site.yml
Dylan M. Taylor 9ed9d5d24b ci: lock workflow actions through an actions.lock lockfile
Mutable action tags are a supply-chain risk: a moved tag runs different code
without a diff. Every workflow action is now pinned through
.github/workflows/actions.lock, and CI verifies the lockfile so an out-of-sync
or tampered one fails instead of running.
2026-11-12 10:06:54 -05:00

51 lines
1.2 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: Deploy site
on:
push:
branches:
- main # Or your default branch
paths:
- 'docs/**'
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Harden runner
uses: step-security/harden-runner@v2.22.4
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@v4.4.0
- name: Set up Node.js
uses: actions/setup-node@v4.4.0
with:
node-version: '22.x'
- name: Install dependencies
run: npm install
- name: Install mkdocs
run: pip install mkdocs-material
- name: Build Site
run: npm run site:build
- name: Generate GitHub App token
id: generate-token
uses: step-security/github-app-token@v2.1.0
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Deploy to site gh-pages
uses: step-security/actions-gh-pages@v4.1.0
with:
external_repository: sparkjsdev/sparkjsdev.github.io
publish_branch: main
publish_dir: ./site
personal_token: ${{ steps.generate-token.outputs.token }}
commit_message: "Deploy Spark site – ${{ github.sha }}"