Skip to content

Commit

Permalink
Add nightly CI to trigger deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
laymonage committed Feb 26, 2025
1 parent 1a3b98e commit 83593b1
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Deploy nightly build

on:
schedule:
- cron: '0 2 * * *' # Run at 2 AM UTC every day
push:
branches:
- main
workflow_dispatch: # Manual trigger

jobs:
deploy-nightly:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# We intentionally don't set `persist-credentials` to `false` because we
# want to push to the nightly branch. This is safe because we only use
# our own commands and there are no external actions beyond this point.

- name: Configure git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Update heroku.yml
run: |
sed -i 's/NIGHTLY: 0/NIGHTLY: 1/' heroku.yml
- name: Create and push commit to nightly branch
run: |
TIMESTAMP=$(date -u +"%Y-%m-%d %H:%M:%S UTC")
git checkout -B nightly
git add heroku.yml
git commit -m "deploy: $TIMESTAMP"
git push --force origin nightly

0 comments on commit 83593b1

Please sign in to comment.