Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
bitfreee committed Jun 8, 2024
1 parent c5ac18e commit 6728b3f
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/cf-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
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 }}

0 comments on commit 6728b3f

Please sign in to comment.