add optional fields to backend and frontend #3
This file contains hidden or 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
name: Deploy Backend to Cloudflare Workers | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- 'packages/backend/**' | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
name: Deploy | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
cache: 'npm' | |
- name: Install dependencies | |
run: | | |
cd packages/backend | |
npm install | |
- name: Run tests | |
run: | | |
cd packages/backend | |
npm test | |
- name: Deploy to Cloudflare Workers | |
uses: cloudflare/wrangler-action@v3 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
workingDirectory: 'packages/backend' | |
secrets: | | |
DISQUS_SECRET_KEY | |
DISQUS_PUBLIC_KEY | |
env: | |
DISQUS_SECRET_KEY: ${{ secrets.DISQUS_SECRET_KEY }} | |
DISQUS_PUBLIC_KEY: ${{ secrets.DISQUS_PUBLIC_KEY }} |