Skip to content

Commit

Permalink
ci: trigger on build
Browse files Browse the repository at this point in the history
  • Loading branch information
anhnguyenbitmark committed Oct 21, 2024
1 parent d9e531a commit 752025f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/cloudflare-pages-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Deploy Remote Configs

on:
push:
branches:
- main
- dev
workflow_dispatch:
inputs:
environment:
Expand All @@ -16,7 +20,7 @@ jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy
environment: ${{ github.event.inputs.environment }}
environment: ${{ github.event.inputs.environment || (github.ref == 'refs/heads/main' && 'Production' || 'Development') }}
steps:
- name: Checkout configs folder
uses: actions/checkout@v4
Expand All @@ -27,7 +31,7 @@ jobs:

- name: Create version.json
run: |
echo "{\"commit\": \"${{ github.sha }}\", \"environment\": \"${{ github.event.inputs.environment }}\"}" > configs/version.json
echo "{\"commit\": \"${{ github.sha }}\", \"environment\": \"${{ github.event.inputs.environment || (github.ref == 'refs/heads/main' && 'Production' || 'Development') }}\"}" > configs/version.json
- name: Deploy to Cloudflare Pages
uses: cloudflare/wrangler-action@v3
Expand Down

0 comments on commit 752025f

Please sign in to comment.