46 lines
977 B
YAML
46 lines
977 B
YAML
name: Deploy Docs to GitHub Pages
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'hindsight-docs/**'
|
|
- '.github/workflows/deploy-docs.yml'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
concurrency:
|
|
group: pages
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: hindsight-docs
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: npm
|
|
cache-dependency-path: hindsight-docs/package-lock.json
|
|
- run: npm ci
|
|
- run: npm run build
|
|
- uses: actions/upload-pages-artifact@v3
|
|
with:
|
|
path: hindsight-docs/build
|
|
deploy:
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
steps:
|
|
- uses: actions/deploy-pages@v4
|
|
id: deployment
|