Workflow file for this run
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: Deploy To Cloudflare | |
on: | |
push: | |
branches: | |
- feat/cf-deploy | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.17.1 | |
cache: "npm" | |
- name: Install Dependencies | |
run: npm ci | |
- name: set-up environment | |
run: echo "${{ secrets.DOT_ENV_PROD }}" > .env | |
- name: build | |
run: npx wrangler pages dev .vercel/output/static --compatibility-flag=nodejs_compat | |
- name: Publish to Cloudflare Pages | |
uses: cloudflare/pages-action@v1 | |
with: | |
apiToken: ${{ secrets.CF_TOKEN }} | |
accountId: ${{ secrets.CF_ACCOUNT_ID }} | |
projectName: ${{secrets.CF_PROJECT_NAME}} | |
directory: .vercel/output/static | |
# Optional: Enable this if you want to have GitHub Deployments triggered | |
gitHubToken: ${{ secrets.GITHUB_TOKEN }} | |