Created
August 3, 2023 12:25
-
-
Save mikroskeem/fddaf7a4f80959d6e5f4711904885fae to your computer and use it in GitHub Desktop.
Publish TypeDoc documentation to GitHub pages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Publish documentation" | |
on: | |
push: | |
branches: | |
- "master" | |
jobs: | |
publish-documentation: | |
permissions: | |
id-token: "write" | |
pages: "write" | |
environment: | |
name: "github-pages" | |
url: "${{ steps.deployment.outputs.page_url }}" | |
runs-on: "ubuntu-latest" | |
steps: | |
- id: "checkout" | |
name: "Check out Git repository" | |
uses: "actions/checkout@v3" | |
- id: "setup-pnpm" | |
name: "Set up pnpm" | |
uses: "pnpm/action-setup@v2" | |
with: | |
version: "8" | |
run_install: false | |
- id: "setup-node" | |
name: "Set up Node.js" | |
uses: "actions/setup-node@v3" | |
with: | |
node-version-file: ".nvmrc" | |
cache: "pnpm" | |
- id: "install-dependencies" | |
name: "Install Node.js dependencies" | |
run: | | |
set -euo pipefail | |
pnpm install --frozen-lockfile | |
- id: "build" | |
name: "Build documentation" | |
run: | | |
set -euo pipefail | |
pnpm run build:doc | |
- id: "upload-documentation" | |
name: "Upload Pages artifact" | |
uses: "actions/upload-pages-artifact@v2" | |
with: | |
path: "docs/" | |
- id: "deployment" | |
name: "Deploy documentation to GitHub Pages" | |
uses: "actions/deploy-pages@v2" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment