Repository navigation
chore(deps): lock file maintenance (#528) #102
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 docs | |
| # Publishes the Toapi docs to GitHub Pages when a changesets release lands on | |
| # main (the "Version Packages" commit), or on demand. This runs independently | |
| # of npm publishing, so a partial `pnpm publish` failure (e.g. packages with no | |
| # version change) never blocks the docs deploy. | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| # One concurrent Pages deployment; let a running one finish. | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| # Only for a changesets release commit, or a manual run. | |
| if: >- | |
| github.event_name == 'workflow_dispatch' || | |
| contains(github.event.head_commit.message, 'Version Packages') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: pnpm/action-setup@v6.1.0 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version-file: .nvmrc | |
| cache: pnpm | |
| - uses: actions/configure-pages@v6 | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm --config.verify-deps-before-run=false --filter @toapi/docs build | |
| - uses: actions/upload-pages-artifact@v5 | |
| with: | |
| path: website/dist | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - id: deployment | |
| uses: actions/deploy-pages@v5 |