Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -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)
50 changes: 2 additions & 48 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -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
30 changes: 0 additions & 30 deletions .github/workflows/main-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: Main Release
permissions:
contents: write
packages: write
pages: write
id-token: write

on:
push:
Expand Down Expand Up @@ -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
Loading