diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 0000000..c77e2e1 --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,76 @@ +name: Pages – aggregate all branches + +on: + push: + branches: ["**"] + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: pages + cancel-in-progress: true + +jobs: + aggregate_deploy: + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deploy.outputs.page_url }} + steps: + - name: Checkout (shallow) + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Configure Pages + uses: actions/configure-pages@v5 + + - name: Aggregate files from all branches into ./public + shell: bash + run: | + set -euo pipefail + mkdir -p public + + # List remote branches (exclude HEAD pointer) + mapfile -t BRANCHES < <(git ls-remote --heads origin \ + | awk '{print $2}' | sed 's@refs/heads/@@') + + # Minimal index page + cat > public/index.html <<'HTML' + +