Skip to content

Commit 2b535f2

Browse files
committed
Auto-deploy on push to main
1 parent 33322b6 commit 2b535f2

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

.github/workflows/forecast-request.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
name: Forecast Request
2-
run-name: Forecast • ${{ inputs.slug }}
2+
run-name: ${{ github.event_name == 'workflow_dispatch' && format('Forecast • {0}', inputs.slug) || format('Deploy • {0}', github.sha) }}
33

44
on:
5+
push:
6+
branches:
7+
- main
58
workflow_dispatch:
69
inputs:
710
slug:
@@ -31,6 +34,7 @@ permissions:
3134

3235
jobs:
3336
forecast:
37+
if: github.event_name == 'workflow_dispatch'
3438
runs-on: ubuntu-latest
3539
steps:
3640
- name: Checkout
@@ -82,6 +86,16 @@ jobs:
8286
sleep $((RANDOM % 5 + 2))
8387
done
8488
89+
deploy:
90+
if: github.event_name == 'push'
91+
runs-on: ubuntu-latest
92+
concurrency:
93+
group: deploy-main
94+
cancel-in-progress: true
95+
steps:
96+
- name: Checkout
97+
uses: actions/checkout@v4
98+
8599
- name: Setup Node for site build
86100
uses: actions/setup-node@v4
87101
with:

0 commit comments

Comments
 (0)