Skip to content

Commit

Permalink
Merge pull request #12 from bitfreee/feat/cf-deploy
Browse files Browse the repository at this point in the history
Deploy to Cloudflare Pages
  • Loading branch information
bitfreee authored Jun 8, 2024
2 parents c5ac18e + 67170a9 commit 07bf722
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:
- main
- dev
pull_request:
branches:
- main
- dev

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 @cloudflare/next-on-pages

- 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

0 comments on commit 07bf722

Please sign in to comment.