name: Deploy to GitHub Pages on: # Run on push to main branch push: branches: [ main ] # Allow manual trigger workflow_dispatch: # Sets permissions of the GITHUB_TOKEN permissions: contents: read pages: write id-token: write # Allow only one concurrent deployment concurrency: group: pages cancel-in-progress: true jobs: build: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 # Need full history for git log in gather_links.py - name: Setup Python uses: actions/setup-python@v5 with: python-version: '3.12' - name: Install dependencies run: | python -m pip install --upgrade pip - name: Generate links and build colophon run: | python gather_links.py python build_colophon.py - name: Setup Pages uses: actions/configure-pages@v4 - name: Build with Jekyll uses: actions/jekyll-build-pages@v1 - name: Upload artifact uses: actions/upload-pages-artifact@v3 deploy: environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest needs: build steps: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4