Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Kha committed Oct 26, 2023
0 parents commit b02e643
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/update-index.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
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?per-page=100 > releases
curl -H "Authorization: ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/leanprover/lean4-nightly/releases?per-page=100 > releases-nightly
mkdir output
jq -s '{version: "1", stable: .[0] | map(select(.prerelease)), beta: .[0] | map(select(.prerelease | not)), nightly: .[1]}' releases releases-nightly > output/index.json
- name: Create artifact
uses: actions/upload-pages-artifact@v2
with:
path: output
deploy:
needs: create-index
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

0 comments on commit b02e643

Please sign in to comment.