Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
lyc8503 committed Nov 8, 2023
2 parents be66dda + 7b6ad87 commit 1e6d183
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Deploy to Cloudflare

on:
push:
branches: [ "main" ]

jobs:
worker:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v2
with:
node-version: '18'

# For some reason, the default registry MAY FAIL WITH ECONNRESET on GitHub Actions
- name: Setup Registry
run: |
npm config set registry https://registry.npm.taobao.org
- name: Deploy Workers
uses: cloudflare/[email protected]
with:
apiToken: ${{ secrets.API_TOKEN }}
preCommands: |
npm install --loglevel verbose
command: deploy
workingDirectory: worker

page:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v2
with:
node-version: '18'

# For some reason, the default registry MAY FAIL WITH ECONNRESET on GitHub Actions
- name: Setup Registry
run: |
npm config set registry https://registry.npm.taobao.org
- name: Deploy Pages
uses: cloudflare/[email protected]
with:
apiToken: ${{ secrets.API_TOKEN }}
preCommands: |
npm install
npx @cloudflare/next-on-pages
command: pages deploy .vercel/output/static

0 comments on commit 1e6d183

Please sign in to comment.