Skip to content

Undo breakage of links from a changed heading #46

Undo breakage of links from a changed heading

Undo breakage of links from a changed heading #46

Workflow file for this run

name: deploy (dev)
on:
push:
branches:
- 'master'
- 'main'
- 'edge'
- 'deploy'
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest
# queued. But do not cancel in-progress runs - we want these deploymeents to complete.
concurrency:
group: 'deploy'
cancel-in-progress: false
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
deploy:
environment:
name: github-pages
url: ${{ vars.SITE_URL }}
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Check out repo
uses: actions/checkout@v7
with:
# Only fetch files we actually need:
fetch-depth: 0
filter: 'blob:none'
# Node is required for npm
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version: "20" # FIXME: this is very old and out-of-date. Bump the version!
- name: Cache ~/.npm
uses: actions/cache@v6
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node
- name: Clean-install dependencies
run: npm ci
- name: Preprocess documentation variant (full)
run: npm run preprocess-full
- name: Cache Docusaurus build
uses: actions/cache@v6
with:
path: |
${{ github.workspace }}/.docusaurus
${{ github.workspace }}/**/.cache
key: |
${{ runner.os }}-docusaurus-full-${{ hashFiles('**/package-lock.json', '**/npm-shrinkwrap.json', '**/yarn.lock', '**/pnpm-lock.yaml') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
restore-keys: |
${{ runner.os }}-docusaurus-full-${{ hashFiles('**/package-lock.json', '**/npm-shrinkwrap.json', '**/yarn.lock', '**/pnpm-lock.yaml') }}
- name: Build documentation
env:
VARIANT: full
RELEASE_CHANNEL: ${{ vars.RELEASE_CHANNEL }} # NOTE: this is expected to be set by the deployment environment!
SITE_URL: ${{ vars.SITE_URL }} # NOTE: this is expected to be set by the deployment environment!
run: |
BUILD_DATE="$(git show -s --format=%cs ${GITHUB_SHA})" npm run build
- name: Generate redirects for legacy URLs
if: vars.RELEASE_CHANNEL == 'development' # only because openuc2.github.io redirects to the dev release channel's website
env:
VARIANT: full
run: npm run postprocess-external-redirects
- name: Set up Pages
id: pages
uses: actions/configure-pages@v6
- name: Upload artifact
uses: actions/upload-pages-artifact@v5
with:
path: ./build
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5