repo site generator #7381
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: repo site generator | |
on: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: 41 */3 * * * | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
# Allow one concurrent deployment | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Cache package manifests | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-package-manifests | |
with: | |
path: ./cache | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('packages/*') }} | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install dependencies | |
run: python3 -m pip install -r ./requirements.txt | |
- name: Generate repository data | |
run: python3 -m repogen -i ./packages -o ./content -D -L | |
- name: Generate site content | |
run: invoke build | |
- name: Setup Pages | |
uses: actions/configure-pages@v2 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: 'output' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 |