Skip to content

Deploy Log Web App to Cloudflare Worker #1

Deploy Log Web App to Cloudflare Worker

Deploy Log Web App to Cloudflare Worker #1

name: Deploy Log Web App to Cloudflare Worker
on:
workflow_run:
workflows: ["Conventional Commits"]
types:
- completed
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
name: Deploy to Cloudflare Worker
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "20.3.0"
- name: Build TypeScript
run: cd ./log-app && npm install && npm run build
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ secrets.CLOUDFLARE_PROJECT_NAME }}
directory: ${{ secrets.LOGGER_WEB_APP_DIRECTORY }}
# Enable Wrangler v3
wranglerVersion: "3"