Update, tidy up, and standardize GitHub Actions workflows

This commit is contained in:
Keavon Chambers
2026-03-16 02:45:18 -07:00
parent f7815d0cd0
commit efd142f030
15 changed files with 224 additions and 173 deletions

View File

@@ -1,6 +1,7 @@
name: "Website"
on:
workflow_dispatch: {}
push:
branches:
- master
@@ -9,7 +10,6 @@ on:
pull_request:
paths:
- website/**
workflow_dispatch: {}
env:
CARGO_TERM_COLOR: always
INDEX_HTML_HEAD_INCLUSION: <script defer data-domain="graphite.art" data-api="/visit/event" src="/visit/script.hash.js"></script>
@@ -23,16 +23,13 @@ jobs:
pull-requests: write
steps:
- name: 📥 Clone and checkout repository
uses: actions/checkout@v3
- name: 📥 Clone repository
uses: actions/checkout@v4
# We can remove this step once `ubuntu-latest` has Node.js 22 or newer for its native TypeScript support. See:
# https://github.com/actions/runner-images?tab=readme-ov-file#available-images
# https://nodejs.org/en/learn/typescript/run-natively
- name: 📦 Install the latest Node.js
- name: 🟢 Install Node.js
uses: actions/setup-node@v4
with:
node-version: "latest"
node-version-file: .nvmrc
- name: 🕸 Install Zola
uses: taiki-e/install-action@v2
@@ -54,7 +51,7 @@ jobs:
- name: 💿 Obtain cache of auto-generated code docs artifacts
id: cache-website-code-docs
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: artifacts
key: website-code-docs
@@ -98,12 +95,9 @@ jobs:
zola --config config.toml build --minify
- name: 📤 Publish to Cloudflare Pages
id: cloudflare
uses: cloudflare/pages-action@1
continue-on-error: true
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
projectName: graphite-website
directory: website/public
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
run: |
npx wrangler@3 pages deploy "website/public" --project-name="graphite-website" --commit-dirty=true