Skip to content

refactor: split the main file into 3 (#514) #5

refactor: split the main file into 3 (#514)

refactor: split the main file into 3 (#514) #5

name: Deploy Documentation Build to GitHub pages
on:
push:
branches:
- 'main'
tags:
- '**'
jobs:
generate-documentation:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18]
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Generate Documentation
run: pnpm run doc
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: 'docs/'
deploy:
# Add a dependency to the build job
needs: generate-documentation
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2 # or the latest "vX.X.X" version tag for this action