# Simple workflow for deploying static content to GitHub Pages name: Deploy static content to Pages on: workflow_run: workflows: ["Harness"] branches: [master] types: - completed # 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: # Single deploy job since we're just deploying deploy: # Don't run if test harness failed if: ${{ github.event.workflow_run.conclusion == 'success' }} environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest steps: - name: Setup Pages uses: actions/configure-pages@v3 - name: Download build artifacts # Not the default gh download-artifact action, which doesn't work # between workflows uses: dawidd6/action-download-artifact@v2 with: workflow: ${{ github.event.workflow_run.workflow_id }} name: Catala artifacts path: artifacts/ - uses: awalsh128/cache-apt-pkgs-action@latest with: packages: tree version: 1.0 - name: Generate HTML index run: | cd artifacts tree -H . -L 1 --noreport --dirsfirst -T 'Catala latest development artifacts' --charset utf-8 -o index.html - name: Upload artifact uses: actions/upload-pages-artifact@v1 with: path: 'artifacts/' - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v1