From 0cfa49a944d6dcdea70e64c529ba9b10ebb2b887 Mon Sep 17 00:00:00 2001 From: Noratrieb <48135649+Noratrieb@users.noreply.github.com> Date: Sun, 27 Jul 2025 18:25:10 +0200 Subject: [PATCH] keep-alive --- .github/workflows/build.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 71a8517..1d2d836 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,6 +4,8 @@ on: workflow_dispatch: push: branches: ["main"] + schedule: + - cron: "0 0 * * *" # every day at 00:00 UTC, should be equivalent to the nightly. permissions: contents: read @@ -41,3 +43,19 @@ jobs: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4 + + keep-alive: + runs-on: ubuntu-latest + permissions: + actions: write + steps: + # We don't often commit to this repository, and without any activity GitHub Actions will + # disable scheduled workflows after 60 days. It turns out that calling the "enable" API even + # before the workflow is disabled resets the 60 days counter though! + # + # Copied from https://github.com/rust-lang/generate-manifest-list/blob/5440ac3d7029fcb961854883c5ac267d50fed15b/.github/workflows/cron.yml + - name: Call the GitHub API + run: | + curl -X PUT "https://api.github.com/repos/${GITHUB_REPOSITORY}/actions/workflows/build.yml/enable" -H "Authorization: token ${GITHUB_TOKEN}" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}