Version Packages #498
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: "docs" | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| actions: read | |
| contents: read | |
| pages: write | |
| id-token: write | |
| env: | |
| TURBO_TELEMETRY_DISABLED: 1 | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: "1.3.10" | |
| - name: ♻️ Cache Bun install | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.bun/install/cache | |
| key: bun-install-${{ runner.os }}-${{ hashFiles('bun.lock') }} | |
| restore-keys: bun-install-${{ runner.os }}- | |
| - name: ♻️ Cache Turbo | |
| uses: actions/cache@v4 | |
| with: | |
| path: .turbo | |
| key: turbo-${{ runner.os }}-${{ github.sha }} | |
| restore-keys: turbo-${{ runner.os }}- | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Build project | |
| run: | | |
| bun run build | |
| bun run docs:prepare | |
| - name: Build Docs | |
| run: | | |
| cd docs | |
| bun install --frozen-lockfile | |
| bun run build | |
| - name: Upload Docs | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./docs/build | |
| deploy: | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |