mirror of
https://github.com/storytold/spark.git
synced 2026-11-21 17:50:46 +01:00
Each third-party action that StepSecurity publishes a secure drop-in replacement for now uses that replacement, pinned to a commit with its version as a comment. Versions follow what we used: the newest StepSecurity release in the same major, or the closest major they publish. dtolnay/rust-toolchain refs that named a toolchain (stable, nightly, 1.76) become the replacement's `toolchain` input.
51 lines
1.4 KiB
YAML
51 lines
1.4 KiB
YAML
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@1d88384fd173af6ecb012dfd0264a306b711241a # v2.22.4
|
||
with:
|
||
egress-policy: audit
|
||
- name: Checkout repository
|
||
uses: actions/checkout@v4
|
||
|
||
- name: Set up Node.js
|
||
uses: actions/setup-node@v4
|
||
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@9c6774f939bc4b39dbaa78ad6ea7e7352a844e37 # 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@1ff395e0ea299d67210bc800e606c1c7f000bbd2 # 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 }}"
|