Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cloudflare workers for backend process #13

Merged
merged 16 commits into from
Jul 18, 2024
54 changes: 54 additions & 0 deletions .github/workflows/deploy-cloudflare-workers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Deploy cloudflare-workers to Workers

on:
push:
tags:
- "*"
paths:
- cloudflare-workers/**
workflow_dispatch:
Enter-tainer marked this conversation as resolved.
Show resolved Hide resolved

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./cloudflare-workers
steps:
- uses: actions/checkout@v4
name: Checkout Repo
- uses: actions/setup-node@v4
name: Set Node.js 20.x
with:
node-version: 20.x
- uses: borales/actions-yarn@v5
name: Run install
with:
cmd: install
dir: cloudflare-workers
- name: Deploy
uses: cloudflare/wrangler-action@v3
with:
workingDirectory: "cloudflare-workers"
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
secrets: |
ADMINISTRATOR_SECRET
env:
ADMINISTRATOR_SECRET: ${{ secrets.ADMINISTRATOR_SECRET }}
shaokeyibb marked this conversation as resolved.
Show resolved Hide resolved
upload-artifacts:
name: Upload Artifacts
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./cloudflare-workers
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
name: Checkout Repo
- uses: actions/upload-artifact@v2
with:
name: cloudflare-workers
path: cloudflare-workers