Merge branch 'next' #14
This file contains 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: Cloudflare Pages Deployment | |
on: | |
push: | |
branches: | |
- main | |
- next | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
name: Build and Deploy | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Deno | |
uses: denoland/setup-deno@v2 | |
with: | |
deno-version: v2.x | |
- name: Install Dependencies | |
run: deno task install | |
- name: Build Website | |
env: | |
CF_ZONE_ID: ${{ secrets.CF_ZONE_ID }} | |
CF_RADAR_TOKEN: ${{ secrets.CF_RADAR_TOKEN }} | |
GOOGLE_PAGESPEED_KEY: ${{ secrets.GOOGLE_PAGESPEED_KEY }} | |
PRODUCTION: true | |
run: deno task build | |
- name: Install Wrangler | |
run: deno install --global --allow-scripts npm:wrangler@latest | |
- name: Get branch name | |
run: echo "BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV | |
- name: Deploy Website to Cloudflare | |
env: | |
BRANCH_NAME: ${{ env.BRANCH_NAME }} | |
uses: cloudflare/wrangler-action@v3 | |
with: | |
accountId: ${{ secrets.CF_ACCOUNT_ID }} | |
apiToken: ${{ secrets.CF_DEPLOY_TOKEN }} | |
command: pages deploy ./dist --project-name=stupid --branch=${{ env.BRANCH_NAME }} --commit-dirty=true |