feat: initial commit #4
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: Publish Docs | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use pnpm | |
| uses: pnpm/action-setup@v2 | |
| - name: Use Node.js 22.x | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: 22 | |
| cache: 'pnpm' | |
| - name: Install Dependencies | |
| run: pnpm --filter @jsonapi-serde/root --filter @jsonapi-serde/docs install | |
| - name: Build | |
| run: pnpm --filter @jsonapi-serde/docs build | |
| - name: Upload static files as artifact | |
| id: deployment | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: packages/docs/.vitepress/dist/ | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |