name: Deploy to GitHub Pages on: push: branches: [main] workflow_dispatch: permissions: contents: read pages: write id-token: write concurrency: group: pages cancel-in-progress: true jobs: deploy: environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 with: persist-credentials: false - name: Configure Pages uses: actions/configure-pages@v5 - name: Assemble minimal Pages package shell: bash run: | set -euo pipefail rm -rf site-dist mkdir -p site-dist/site site-dist/frameworks site-dist/.design_library/aurora-admin cp index.html sitemap.xml site-dist/ cp -a site/. site-dist/site/ cp -a frameworks/. site-dist/frameworks/ # The live documentation reads these token, aggregate CSS and contract assets. cp .design_library/aurora-admin/colors_and_type.css site-dist/.design_library/aurora-admin/ cp .design_library/aurora-admin/components.css site-dist/.design_library/aurora-admin/ cp .design_library/aurora-admin/css.json site-dist/.design_library/aurora-admin/ cp -a .design_library/aurora-admin/components site-dist/.design_library/aurora-admin/ # Pages excludes repository-only tests, raw specifications, metadata and reports. rm -rf site-dist/.git site-dist/.github site-dist/.design_library/aurora-admin/specs \ site-dist/.design_library/aurora-admin/agent-reports site-dist/.design_library/aurora-admin/preview \ site-dist/.design_library/aurora-admin/ui_kits site-dist/tests # Exception: the homepage pass-rate card fetches ../tests/report.json. Without this # single file the card silently renders nothing (the fetch 404s and is swallowed), # so it must be copied back after the tests/ purge above. mkdir -p site-dist/tests cp tests/report.json site-dist/tests/report.json find site-dist -type f \( -name '*.ps1' -o -name '*.yml' -o -name '*.yaml' \) -delete test -f site-dist/site/index.html test -f site-dist/site/data.json test -f site-dist/site/tokens/tokens.css test -f site-dist/tests/report.json test "$(find site-dist/site/components -maxdepth 1 -name '*.html' | wc -l)" -eq 79 du -sh site-dist - name: Upload Pages artifact uses: actions/upload-pages-artifact@v3 with: path: site-dist - id: deployment uses: actions/deploy-pages@v4