mkdocs-ci-site-publisher-cron #190
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: mkdocs-ci-site-publisher-cron | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 5 * * *' # Runs at night (05:00 UTC) every Day | |
permissions: | |
contents: write | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Configure Git Credentials | |
run: | | |
git config user.name github-actions[bot] | |
git config user.email 123456+github-actions[bot]@users.noreply.github.com | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.9 | |
- run: pip install ranking-table-tennis | |
# - run: pip install git+https://github.com/srvanrell/ranking-table-tennis.git@branch-name | |
# Combines preprocess, compute and publish to automatically resolve | |
- id: rtt-automatic | |
env: | |
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }} | |
run: rtt automatic | |
- if: ${{ steps.rtt-automatic.outputs.stop_workflow != 'true' }} | |
run: ./update_results_to_publish.sh | |
- if: ${{ steps.rtt-automatic.outputs.stop_workflow != 'true' }} | |
uses: EndBug/add-and-commit@v9 | |
with: | |
message: Committed from cron workflow | |
committer_name: GitHub Actions | |
committer_email: actions@github.com | |
- if: ${{ steps.rtt-automatic.outputs.stop_workflow != 'true' }} | |
run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV | |
- if: ${{ steps.rtt-automatic.outputs.stop_workflow != 'true' }} | |
uses: actions/cache@v4 | |
with: | |
key: mkdocs-material-${{ env.cache_id }} | |
path: .cache | |
restore-keys: | | |
mkdocs-material- | |
- if: ${{ steps.rtt-automatic.outputs.stop_workflow != 'true' }} | |
run: pip install \ | |
mkdocs-material \ | |
mkdocs-macros-plugin \ | |
mkdocs-awesome-pages-plugin | |
- if: ${{ steps.rtt-automatic.outputs.stop_workflow != 'true' }} | |
run: mkdocs gh-deploy --force |