Deploy Log Web App to Cloudflare Worker #4
This file contains 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 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" |