Skip to content

Commit 83593b1

Browse files
committed
Add nightly CI to trigger deployment
1 parent 1a3b98e commit 83593b1

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/nightly.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Deploy nightly build
2+
3+
on:
4+
schedule:
5+
- cron: '0 2 * * *' # Run at 2 AM UTC every day
6+
push:
7+
branches:
8+
- main
9+
workflow_dispatch: # Manual trigger
10+
11+
jobs:
12+
deploy-nightly:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
# We intentionally don't set `persist-credentials` to `false` because we
17+
# want to push to the nightly branch. This is safe because we only use
18+
# our own commands and there are no external actions beyond this point.
19+
20+
- name: Configure git
21+
run: |
22+
git config user.name "github-actions[bot]"
23+
git config user.email "github-actions[bot]@users.noreply.github.com"
24+
25+
- name: Update heroku.yml
26+
run: |
27+
sed -i 's/NIGHTLY: 0/NIGHTLY: 1/' heroku.yml
28+
29+
- name: Create and push commit to nightly branch
30+
run: |
31+
TIMESTAMP=$(date -u +"%Y-%m-%d %H:%M:%S UTC")
32+
git checkout -B nightly
33+
git add heroku.yml
34+
git commit -m "deploy: $TIMESTAMP"
35+
git push --force origin nightly

0 commit comments

Comments
 (0)