ci(release): check out the release tag ref so npm provenance succeeds… #33
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: Continuous Deployment | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| name: GitHub Pages | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v7 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Build all packages | |
| run: bun run build | |
| - name: Generate documentation for all packages | |
| run: bun run docs | |
| - name: Organize documentation with playground | |
| run: | | |
| # Create docs directory and copy each package's docs dynamically | |
| mkdir -p public | |
| for package_dir in packages/*/; do | |
| package_name=$(basename "$package_dir") | |
| if [ -d "$package_dir/docs" ]; then | |
| cp -r "$package_dir/docs" "public/$package_name" | |
| fi | |
| done | |
| # Copy landing page to root | |
| cp apps/docs/index.html public/ | |
| cp apps/docs/style.css public/ | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v6 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v5 | |
| with: | |
| path: ./public | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v5 |