claude/improve-agent-questions-mCYwj (#220) #146
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 Website | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Install dependencies | |
| run: bun install | |
| working-directory: website | |
| - uses: hashicorp/setup-terraform@v3 | |
| with: | |
| terraform_wrapper: false | |
| - name: Authenticate to GCP | |
| uses: google-github-actions/auth@v2 | |
| with: | |
| credentials_json: ${{ secrets.GCP_SA_KEY }} | |
| - name: Fetch Sentry DSNs from Terraform | |
| id: sentry | |
| working-directory: deploy/terraform/sentry | |
| run: | | |
| terraform init -input=false | |
| echo "dsn_website=$(terraform output -raw sentry_dsn_website)" >> $GITHUB_OUTPUT | |
| echo "dsn_spa=$(terraform output -raw sentry_dsn_spa)" >> $GITHUB_OUTPUT | |
| env: | |
| SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
| - name: Build website | |
| run: bun run build | |
| working-directory: website | |
| env: | |
| NEXT_PUBLIC_REPO_SLUG: ${{ github.repository }} | |
| NEXT_PUBLIC_HAIKU_GITHUB_OAUTH_CLIENT_ID: ${{ vars.NEXT_PUBLIC_HAIKU_GITHUB_OAUTH_CLIENT_ID }} | |
| NEXT_PUBLIC_HAIKU_GITLAB_OAUTH_CLIENT_ID: ${{ vars.NEXT_PUBLIC_HAIKU_GITLAB_OAUTH_CLIENT_ID }} | |
| NEXT_PUBLIC_HAIKU_AUTH_PROXY_URL: ${{ vars.NEXT_PUBLIC_HAIKU_AUTH_PROXY_URL }} | |
| NEXT_PUBLIC_SENTRY_DSN: ${{ steps.sentry.outputs.dsn_website }} | |
| SENTRY_DSN_REVIEW_SPA: ${{ steps.sentry.outputs.dsn_spa }} | |
| SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
| SENTRY_URL: https://sentry.ops.gigsmart.com | |
| SENTRY_ORG: gigsmart | |
| SENTRY_PROJECT: haiku-website | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: website/out | |
| 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@v4 |