Skip to content

ci: update docs workflow to use actions/deploy-pages #499

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 27 additions & 5 deletions .github/workflows/update-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,41 @@ name: Update docs on pushes to main
push:
branches:
- main

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
update_docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
cache-dependency-path:
./docs/package-lock.json
./package-lock.json
- run: npm ci
- run: npm --prefix ./docs ci ./docs
- run: npm run build --prefix ./docs -- --prefix-paths
- uses: maxheld83/ghpages@master
env:
BUILD_DIR: docs/public/
GH_PAT: ${{ secrets.OCTOKITBOT_PAT }}
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './docs/public'

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: update_docs
permissions:
pages: write
id-token: write
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4