Deploy to GitHub Pages #141
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: Deploy to GitHub Pages | |
| on: | |
| workflow_dispatch: | |
| workflow_run: | |
| workflows: ["Release"] | |
| types: | |
| - completed | |
| permissions: | |
| contents: write | |
| jobs: | |
| deploy: | |
| name: Deploy to GitHub Pages | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }} | |
| environment: github-pages | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node.js 20.x | |
| uses: actions/setup-node@v4 | |
| with: | |
| cache: 'yarn' | |
| node-version: 20.12.2 | |
| - name: Install dependencies | |
| run: yarn install --immutable | |
| - name: Lint Documentation | |
| run: yarn workspace openapi-qraft-website run lint | |
| - name: Build website | |
| run: yarn workspace openapi-qraft-website run build | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./website/build |