mirror of
https://github.com/bmad-code-org/BMAD-METHOD.git
synced 2026-09-19 08:11:52 +08:00
fa1637ee40
The root package.json, lockfile, .nvmrc, prettier ignore file and .npmignore are gone. docs-site has its own package.json and lockfile with the Astro, ESLint and Prettier dependencies, and its scripts run relative to that directory. tools/quality.py, both workflows and the docs all call npm inside docs-site. stamp_release.py stamps only the 29 skill manifests now; the version lives nowhere else on this branch. The tests for package stamping go with it.
64 lines
1.5 KiB
YAML
64 lines
1.5 KiB
YAML
name: Deploy Documentation
|
|
|
|
on:
|
|
push:
|
|
branches: [dev]
|
|
paths: [docs/**, docs-site/**, .github/workflows/docs.yaml]
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
concurrency:
|
|
group: pages
|
|
# No big win in setting this to true — risk of cancelling a deploy mid-flight.
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: docs-site
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
# Full history needed for Starlight's lastUpdated timestamps (git log)
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version-file: docs-site/.nvmrc
|
|
cache: npm
|
|
cache-dependency-path: docs-site/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Build documentation
|
|
env:
|
|
# Override site URL from GitHub repo variable if set
|
|
# Otherwise, astro.config.mjs will compute from GITHUB_REPOSITORY
|
|
SITE_URL: ${{ vars.SITE_URL }}
|
|
run: npm run build
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-pages-artifact@v3
|
|
with:
|
|
path: build/site
|
|
|
|
deploy:
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
steps:
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v4
|