copy: sharpen LizzieYzy Next homepage value #10
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 | |
| paths: | |
| - "website/**" | |
| - "scripts/check_website.mjs" | |
| - ".github/workflows/deploy-website.yml" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| deployments: write | |
| concurrency: | |
| group: cloudflare-pages-website-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| deploy: | |
| name: Build and deploy goagent.top | |
| runs-on: ubuntu-latest | |
| env: | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.30.3 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - name: Install website dependencies | |
| run: pnpm install --filter @goagent/website... --frozen-lockfile --ignore-scripts | |
| - name: Build website | |
| run: pnpm website:build | |
| - name: Check website contract | |
| run: pnpm check:website | |
| - name: Report missing Cloudflare secrets | |
| if: ${{ env.CLOUDFLARE_API_TOKEN == '' || env.CLOUDFLARE_ACCOUNT_ID == '' }} | |
| run: | | |
| echo "::warning title=Cloudflare deploy skipped::Set repository secrets CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID to enable automatic Pages deploys." | |
| - name: Deploy to Cloudflare Pages | |
| if: ${{ env.CLOUDFLARE_API_TOKEN != '' && env.CLOUDFLARE_ACCOUNT_ID != '' }} | |
| uses: cloudflare/wrangler-action@v3 | |
| with: | |
| apiToken: ${{ env.CLOUDFLARE_API_TOKEN }} | |
| accountId: ${{ env.CLOUDFLARE_ACCOUNT_ID }} | |
| command: pages deploy website/dist --project-name=goagent --branch=${{ github.ref_name }} --commit-hash=${{ github.sha }} |