nightly.yml 1.0 KB

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