mirror of
https://github.com/zhigang1992/workers-graphql-server.git
synced 2026-01-12 09:43:41 +08:00
Add GitHub Actions deploy workflow
This commit is contained in:
25
.github/workflows/deploy.yml
vendored
Normal file
25
.github/workflows/deploy.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
name: Deploy to Cloudflare Workers
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
repository_dispatch:
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
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
|
||||
- name: Publish
|
||||
uses: cloudflare/wrangler-action@1.2.0
|
||||
with:
|
||||
apiToken: ${{ secrets.CF_API_TOKEN }}
|
||||
env:
|
||||
CF_ACCOUNT_ID: ${{secrets.CF_ACCOUNT_ID}}
|
||||
Reference in New Issue
Block a user