mirror of
https://github.com/ciiiii/cloudflare-docker-proxy.git
synced 2025-12-06 14:42:51 +08:00
Deploy staging env (#21)
* Deploy staging env * Fix ci * Fix staging configuration * Fix production configuration
This commit is contained in:
14
.github/workflows/deploy.yaml
vendored
14
.github/workflows/deploy.yaml
vendored
@@ -13,15 +13,11 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
name: Build & Deploy
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: "12.x"
|
||||
- run: npm install
|
||||
- uses: actions/checkout@v4
|
||||
- name: Publish
|
||||
uses: cloudflare/wrangler-action@2.0.0
|
||||
uses: cloudflare/wrangler-action@v3
|
||||
with:
|
||||
apiToken: ${{ secrets.CF_API_TOKEN }}
|
||||
env:
|
||||
CF_ACCOUNT_ID: ${{secrets.CF_ACCOUNT_ID}}
|
||||
accountId: ${{secrets.CF_ACCOUNT_ID}}
|
||||
command: deploy --env production --minify src/index.js
|
||||
environment: production
|
||||
23
.github/workflows/stage.yaml
vendored
Normal file
23
.github/workflows/stage.yaml
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
name: Deploy to Cloudflare Workers(Staging)
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
repository_dispatch:
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
name: Build & Deploy
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Publish
|
||||
uses: cloudflare/wrangler-action@v3
|
||||
with:
|
||||
apiToken: ${{ secrets.CF_API_TOKEN }}
|
||||
accountId: ${{secrets.CF_ACCOUNT_ID}}
|
||||
command: deploy --env staging --minify src/index.js
|
||||
environment: staging
|
||||
Reference in New Issue
Block a user