-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (28 loc) · 983 Bytes
/
keep-awake.yaml
File metadata and controls
35 lines (28 loc) · 983 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Keep Streamlit App Alive via Commit
on:
schedule:
# Runs every 30 minutes
- cron: '*/30 * * * *'
workflow_dispatch:
jobs:
keep-alive:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout streamlit-prod branch
uses: actions/checkout@v3
with:
ref: streamlit-prod # Ensures we are on the correct branch
- name: Configure Git
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: Create Dummy Commit
run: |
# The --allow-empty flag is crucial as it creates a commit even if there are no changes.
git commit --allow-empty -m "feat: Keep-alive commit"
- name: Push Dummy Commit
run: |
# Pushes the commit to the streamlit-prod branch to trigger a redeployment.
git push origin streamlit-prod