Skip to content

DeployFrontendCloudflarePagesDev #600

DeployFrontendCloudflarePagesDev

DeployFrontendCloudflarePagesDev #600

name: DeployFrontendCloudflarePagesDev
on:
workflow_run:
workflows: ["DeployBackendDev"]
types:
- completed
branches:
- "master"
jobs:
deploy-frontend-dev:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- uses: actions/setup-node@v1
with:
node-version: "20"
- name: Install dependencies and Build the project
run: |
cd nuxt-frontend
sed -i "s|VITE_RECAPTCHA_SITE_KEY_VALUE|${{ secrets.RECAPTCHA_SITE_KEY }}|g" config.js
sed -i "s|RESOURCES_URL|${{ secrets.RESOURCES_URL }}|g" config.js
yarn install && yarn build
- name: Build & Deploy Worker
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: "nuxt-frontend"
command: pages deploy ./dist --project-name=canopas-website-dev --branch=main