ci: fix github pages publishing

This commit is contained in:
Igor Lins e Silva
2026-04-12 05:19:30 -03:00
parent f224c48e09
commit a487d059ba
3 changed files with 30 additions and 14 deletions
+19 -5
View File
@@ -2,9 +2,10 @@ name: Deploy Docs
on:
push:
branches: [main]
branches: [main, develop]
paths:
- 'website/**'
- ".github/workflows/deploy-docs.yml"
- "website/**"
workflow_dispatch:
permissions:
@@ -13,27 +14,36 @@ permissions:
id-token: write
concurrency:
group: pages
cancel-in-progress: false
group: pages-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure GitHub Pages
id: pages
uses: actions/configure-pages@v5
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.1.38
- name: Install dependencies
working-directory: website
run: bun install
run: bun install --frozen-lockfile
- name: Build docs
working-directory: website
env:
DOCS_BASE: ${{ steps.pages.outputs.base_path }}
DOCS_EDIT_BRANCH: ${{ github.ref_name }}
run: bun run docs:build
- uses: actions/upload-pages-artifact@v3
@@ -41,11 +51,15 @@ jobs:
path: website/.vitepress/dist
deploy:
if: github.ref_name == 'main' || github.ref_name == 'develop'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
steps:
- name: Deploy to GitHub Pages
id: deployment