name: Deploy github pages on: push: paths: - 'docs/**' workflow_dispatch: jobs: build: defaults: run: working-directory: docs runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Bun uses: oven-sh/setup-bun@v2 - name: Install dependencies run: bun install - name: Build run: bun run build - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: path: docs/out/ deploy: if: ${{ github.ref == 'refs/heads/main' }} needs: build permissions: pages: write id-token: write environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest steps: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4