From 22de0fdb98c577cb0cdbceab7594ec49ef577dda Mon Sep 17 00:00:00 2001 From: Sebastian Ullrich Date: Thu, 26 Oct 2023 14:22:50 +0200 Subject: [PATCH] Initial commit --- .github/workflows/update-index.yml | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/update-index.yml diff --git a/.github/workflows/update-index.yml b/.github/workflows/update-index.yml new file mode 100644 index 0000000..edfdb31 --- /dev/null +++ b/.github/workflows/update-index.yml @@ -0,0 +1,37 @@ +name: Update index +on: + workflow_dispatch + push: + branches: + - main + +# mutex +concurrency: + group: update-index + cancel-in-progress: false + +jobs: + create-index: + runs-on: ubuntu-latest + steps: + - name: Create index + run: | + set -euxo pipefail + curl -H "Authorization: ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/leanprover/lean4/releases > releases + curl -H "Authorization: ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/leanprover/lean4-nightly/releases > releases-nightly + jq -s '{version: "1", stable: .[0] | map(select(.prerelease)), beta: .[0] | map(select(.prerelease | not)), nightly: .[1]}' releases releases-nightly > index.json + - name: Create artifact + uses: actions/upload-artifact@v3 + with: + name: index + path: index.json + deploy: + needs: create-index + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2