You've already forked gpui-component
mirror of
https://github.com/librekeys/gpui-component.git
synced 2026-04-14 08:46:29 -07:00
90b707a7f1
Closes #1947 ## Description The `Release Docs` action is currently triggered by a tag, but this can cause it to become unsynchronized with the official package version if the package fails to publish. To address this, change the `Release Docs` action to be triggered by the `Release Crate` workflow. Once that workflow completes successfully, it will trigger the documentation release, ensuring that the doc version stays in sync with the official package version.
40 lines
1.0 KiB
YAML
40 lines
1.0 KiB
YAML
name: Release Docs
|
|
on:
|
|
workflow_run:
|
|
workflows: ["Release Crate"]
|
|
types:
|
|
- completed
|
|
workflow_dispatch:
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ github.event.workflow_run.head_sha }}
|
|
- uses: oven-sh/setup-bun@v1
|
|
- name: Install
|
|
working-directory: docs
|
|
run: bun install
|
|
- name: Build
|
|
working-directory: docs
|
|
run: |
|
|
bun run build
|
|
cp .vitepress/dist/index.html .vitepress/dist/404.html
|
|
- name: Setup Pages
|
|
uses: actions/configure-pages@v5
|
|
- name: Upload artifact
|
|
uses: actions/upload-pages-artifact@v3
|
|
with:
|
|
path: "docs/.vitepress/dist"
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v4
|