Create jekyll-gh-pages.yml #1
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: Generate catalog | |
on: | |
# TODO uncomment once we know the scraping works well again | |
#schedule: | |
# - cron: 0 5 * * * | |
push: | |
branches: | |
- main | |
jobs: | |
generate-catalog: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
offset: [0, 10, 20, 30, 40, 50, 60, 70, 80, 90] | |
max-parallel: 1 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: main | |
- name: deployment | |
uses: mamba-org/provision-with-micromamba@main | |
- name: generate-catalog | |
shell: bash -l {0} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
OFFSET: ${{ matrix.offset }} | |
run: | | |
python scripts/generate-catalog.py | |
- name: Commit files | |
run: | | |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git commit -m "Add changes" -a | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} | |
cleanup-catalog: | |
runs-on: ubuntu-latest | |
needs: generate-catalog | |
strategy: | |
matrix: | |
offset: [0, 10, 20, 30, 40, 50, 60, 70, 80, 90] | |
max-parallel: 1 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: main | |
- name: deployment | |
uses: mamba-org/provision-with-micromamba@main | |
- name: generate-catalog | |
shell: bash -l {0} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
OFFSET: ${{ matrix.offset }} | |
run: | | |
python scripts/cleanup-catalog.py | |
- name: Commit files | |
run: | | |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git commit -m "Add changes" -a | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} |