-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/lyc8503/UptimeFlare
- Loading branch information
Showing
1 changed file
with
54 additions
and
0 deletions.
There are no files selected for viewing
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
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 |