Skip to content

Commit

Permalink
Init worker deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
amattu2 committed Oct 13, 2024
1 parent de41622 commit 6896ce9
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 10 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/cloudflare-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ on:
tags:
- "v*"
paths:
- "packages/frontent/src/**"
- "packages/frontend/public/**"
- "packages/frontend/**"

jobs:
publish:
Expand All @@ -25,12 +24,6 @@ jobs:
- name: Install Dependencies
run: npm ci

- name: Test (Jest)
run: npx lerna run test:ci --scope=@better-vinwiki/frontend

- name: Lint (EsLint)
run: npx lerna run lint:ci --scope=@better-vinwiki/frontend

- name: Build
env:
REACT_APP_NAME: ${{ vars.REACT_APP_NAME }}
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/cloudflare-worker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Cloudflare Worker

concurrency:
group: "cloudflare-worker"
cancel-in-progress: false

on:
workflow_dispatch:
push:
tags:
- "v*"
paths:
- "packages/backend/**"

jobs:
publish:
name: Publish to Cloudflare Workers
runs-on: ubuntu-latest
environment: better-vinwiki (Production)
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Dependencies
run: npm ci

- name: Build
run: npx lerna run build --scope=@better-vinwiki/backend

- name: Deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: ./packages/backend
3 changes: 1 addition & 2 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ on:
- development
- dev
paths:
- "packages/frontend/src/**"
- "packages/frontend/public/**"
- "packages/frontend/**"

jobs:
publish:
Expand Down

0 comments on commit 6896ce9

Please sign in to comment.