Merge pull request #228 from hackdays-io/issue/190 #40
This file contains 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: Deploy document to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
# build job | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: yarn | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: Build Document | |
run: yarn document build | |
- name: Upload Build Artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: pkgs/document/build | |
# deploy job | |
deploy: | |
name: Deploy to GitHub Pages | |
needs: build | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy Document | |
id: deployment | |
uses: actions/deploy-pages@v4 | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false |