Skip to content

Keep Streamlit App Alive via Commit #7917

Keep Streamlit App Alive via Commit

Keep Streamlit App Alive via Commit #7917

Workflow file for this run

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