Merge pull request #295 from H4ad/feat/fastify-v5 #75
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 to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- '.github/workflows/docs.yml' | |
- 'www/**' | |
- 'src/**' | |
- 'scripts/**' | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-20.04 | |
permissions: | |
contents: write | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18.x' | |
- name: Cache dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-18-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node-18- | |
- name: Install Lib Dependencies | |
run: npm ci | |
- name: Install Docs Dependencies | |
run: npm ci | |
working-directory: www | |
- name: Parse TSDoc Documentation | |
run: npm run docs:generate | |
- name: Build Docs | |
run: npm run build | |
working-directory: www | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
if: ${{ github.ref == 'refs/heads/main' }} | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./www/build |