Skip to content

Dependency (npm): Refresh yarn.lock for the qs / ws security fixes #3565

Dependency (npm): Refresh yarn.lock for the qs / ws security fixes

Dependency (npm): Refresh yarn.lock for the qs / ws security fixes #3565

Workflow file for this run

name: GitHub Pages
on:
workflow_dispatch:
release:
# Rebuild so the download page picks up the newly published (pre-)release.
types: [published]
push:
branches:
- main
paths:
- '.github/workflows/deploy_website.yml'
- 'Website/**'
pull_request:
paths:
- '.github/workflows/deploy_website.yml'
- 'Website/**'
# Runs that deploy (main, release, manual) run one after the other incl. the build, so the last triggered run also
# deploys last (e.g. a release build isn't overwritten by an older main build). Outdated PR runs are cancelled.
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || 'deploy' }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build-website:
name: "Build Website"
runs-on: ubuntu-latest
permissions:
contents: read
defaults:
run:
working-directory: Website
steps:
- uses: actions/checkout@v7
- name: Setup Node
uses: actions/setup-node@v7
with:
node-version: 22
cache: yarn
cache-dependency-path: Website/yarn.lock
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build website
run: yarn build
env:
# Used by scripts/fetch-release-data.mjs to raise the GitHub API rate limit.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload website
uses: actions/upload-artifact@v7
if: github.event_name == 'release' || (github.event_name != 'pull_request' && github.ref == 'refs/heads/main')
with:
name: website
path: Website/build
# Keep .well-known/ and .nojekyll (hidden files are skipped by default).
include-hidden-files: true
retention-days: 1
# Separate job, so only the deployment gets write access (not the build with its npm dependencies).
deploy-website:
name: "Deploy Website"
needs: build-website
if: github.event_name == 'release' || (github.event_name != 'pull_request' && github.ref == 'refs/heads/main')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download website
uses: actions/download-artifact@v8
with:
name: website
path: build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build