# Simple workflow for deploying static content to GitHub Pages name: Deploy Installation Manifests and Versions on: workflow_dispatch: push: branches: - main - latest - devel # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: contents: read pages: write id-token: write # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. concurrency: group: "pages" cancel-in-progress: false jobs: # Single deploy job since we're just deploying deploy: environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest steps: - name: Setup Pages uses: actions/configure-pages@v3 - name: Setup Python uses: actions/setup-python@v3.1.3 - name: Create outputs folders shell: bash run: mkdir deploy; mkdir deploy/manifests; mkdir deploy/manifests/main deploy/manifests/latest deploy/manifests/devel # Generate manifest + shields files for main branch - name: Checkout main uses: actions/checkout@v3 with: ref: 'main' - name: Generate manifest and shields for main branch run: python imgen.py shields - name: Save main's manifest run: mv install_manifest.json deploy/manifests/main # Generate manifest for latest branch - name: Checkout latest if: success() || failure() uses: actions/checkout@v3 with: ref: 'latest' - name: Generate manifest for latest run: python imgen.py - name: Save latest's manifest run: mv install_manifest.json deploy/manifests/latest # Generate manifest for devel branch - name: Checkout devel if: success() || failure() uses: actions/checkout@v3 with: ref: 'devel' - name: Generate manifest for devel run: python imgen.py - name: Save devel's manifest run: mv install_manifest.json deploy/manifests/devel # All artifacts ready now, upload deploy directory - name: Upload artifacts if: success() || failure() uses: actions/upload-pages-artifact@v1 with: # Upload manifest JSON path: 'deploy/' - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v2