From fbcf02446e2c57258de6f2a690b36b95484b8d4f Mon Sep 17 00:00:00 2001 From: Jonathan Peris Date: Fri, 3 Apr 2026 02:14:09 -0300 Subject: [PATCH] ci: rewrite deploy.yml to match speedy-bird-lynx pages pattern MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rewrite deploy.yml as a clean 1:1 copy of the speedy-bird-lynx GitHub Pages deployment pattern (configure-pages, upload-pages-artifact, deploy-pages). Restore deploy-docs.yml as a separate doc generation workflow. Remove deploy-report job and pages permissions from main-release.yml — Pages deployment is now fully handled by deploy.yml. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/deploy-docs.yml | 46 +++++++++++++++++++++++++++ .github/workflows/deploy.yml | 50 ++---------------------------- .github/workflows/main-release.yml | 30 ------------------ 3 files changed, 48 insertions(+), 78 deletions(-) create mode 100644 .github/workflows/deploy-docs.yml diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml new file mode 100644 index 0000000..e3e2f1c --- /dev/null +++ b/.github/workflows/deploy-docs.yml @@ -0,0 +1,46 @@ +name: Deploy Docs + +on: + workflow_dispatch: + push: + branches: [main] + paths-ignore: + - 'docs/**' + gollum: + +permissions: + contents: write + +jobs: + generate-docs: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v6 + + - name: Clone wiki + run: git clone https://github.com/${{ github.repository }}.wiki.git wiki/ || echo "Wiki not found, skipping" + + - name: Setup Node.js + uses: actions/setup-node@v6 + with: + node-version: '20' + + - name: Install marked + run: npm install marked --no-save + + - name: Generate docs + env: + DOCS_TITLE: "rinha2-back-end-rust" + DOCS_DESCRIPTION: "Rust 1.85 implementation of Rinha de Backend 2024/Q1 — minimal async API built for performance under constraints" + GITHUB_URL: "https://github.com/jonathanperis/rinha2-back-end-rust" + OUTPUT_PATH: "docs/docs/index.html" + TEMPLATE_PATH: ".github/docs-template.html" + run: node .github/generate-docs.js + + - name: Commit and push docs + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add docs/docs/index.html + git diff --staged --quiet || (git commit -m "chore: regenerate docs from wiki [skip ci]" && git push) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a979dc0..e58f08c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,76 +1,30 @@ name: Deploy to GitHub Pages on: - workflow_dispatch: push: branches: [main] - paths-ignore: - - 'docs/**' - gollum: + workflow_dispatch: permissions: - contents: write pages: write id-token: write + contents: read concurrency: group: github-pages cancel-in-progress: false jobs: - generate-docs: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v6 - - - name: Clone wiki - run: git clone https://github.com/${{ github.repository }}.wiki.git wiki/ || echo "Wiki not found, skipping" - - - name: Setup Node.js - uses: actions/setup-node@v6 - with: - node-version: '20' - - - name: Install marked - run: npm install marked --no-save - - - name: Generate docs - env: - DOCS_TITLE: "rinha2-back-end-rust" - DOCS_DESCRIPTION: "Rust 1.85 implementation of Rinha de Backend 2024/Q1 — minimal async API built for performance under constraints" - GITHUB_URL: "https://github.com/jonathanperis/rinha2-back-end-rust" - OUTPUT_PATH: "docs/docs/index.html" - TEMPLATE_PATH: ".github/docs-template.html" - run: node .github/generate-docs.js - - - name: Commit and push docs - run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - git add docs/docs/index.html - git diff --staged --quiet || (git commit -m "chore: regenerate docs from wiki [skip ci]" && git push) - deploy: - needs: generate-docs runs-on: ubuntu-latest environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} - steps: - uses: actions/checkout@v6 - with: - ref: ${{ github.ref }} - - - name: Pull latest changes - run: git pull origin ${{ github.ref_name }} - - uses: actions/configure-pages@v6 - - uses: actions/upload-pages-artifact@v4 with: path: docs/ - - id: deployment uses: actions/deploy-pages@v5 diff --git a/.github/workflows/main-release.yml b/.github/workflows/main-release.yml index a484db1..5b12ebb 100644 --- a/.github/workflows/main-release.yml +++ b/.github/workflows/main-release.yml @@ -3,8 +3,6 @@ name: Main Release permissions: contents: write packages: write - pages: write - id-token: write on: push: @@ -115,31 +113,3 @@ jobs: with: name: stress-test-report path: ./prod/conf/stress-test/reports/stress-test-report.html - - deploy-report: - needs: load-test - runs-on: ubuntu-latest - concurrency: - group: github-pages - cancel-in-progress: false - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - - steps: - - uses: actions/checkout@v6 - - - name: Download stress test report - uses: actions/download-artifact@v4 - with: - name: stress-test-report - path: ./docs/reports/ - - - uses: actions/configure-pages@v6 - - - uses: actions/upload-pages-artifact@v4 - with: - path: docs/ - - - id: deployment - uses: actions/deploy-pages@v5