diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5d68601..2759e0f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,83 +6,47 @@ on: - master concurrency: - group: pages + group: publish cancel-in-progress: true jobs: - deploy: + publish: runs-on: ubuntu-latest permissions: - contents: read - pages: write - id-token: write - actions: read + contents: write - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} + container: + image: ghcr.io/xu-cheng/texlive-full:latest steps: - uses: actions/checkout@v4 - - name: Download PDFs from latest CI run - id: download - uses: dawidd6/action-download-artifact@v6 - with: - name: generated-pdfs - workflow: ci.yml - branch: master - path: artifacts/ - if_no_artifact_found: warn + - name: Mark workspace safe for git + run: git config --global --add safe.directory "$GITHUB_WORKSPACE" - - name: Check PDFs were downloaded - id: check + - name: Build all documents run: | - COUNT=$(find artifacts/ -name "*.pdf" 2>/dev/null | wc -l) - echo "pdf_count=$COUNT" >> $GITHUB_OUTPUT - if [ "$COUNT" -eq 0 ]; then - echo "No PDFs found — nothing to publish." - fi + make -C bylaws public + make -C policies public + make -C board-procedures public - - name: Prepare site - if: steps.check.outputs.pdf_count != '0' + - name: Collect PDFs + id: collect run: | - mkdir -p site - - # Flatten PDFs from nested dist/ dirs into site root - find artifacts/ -name "*.pdf" -exec cp {} site/ \; - - # Generate index page - cat > site/index.html << 'EOF' - - -
- -