mirror of
https://github.com/DanielLavrushin/b4.git
synced 2026-04-28 11:30:39 +00:00
49 lines
1 KiB
YAML
49 lines
1 KiB
YAML
name: Deploy documentation
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup PNPM
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 10.18.2
|
|
run_install: false
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: "pnpm"
|
|
cache-dependency-path: |
|
|
./docs/pnpm-lock.yaml
|
|
|
|
- name: Install dependencies
|
|
working-directory: docs
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Build docs
|
|
working-directory: docs
|
|
run: pnpm build
|
|
|
|
- name: Verify output
|
|
run: ls -R docs/build
|
|
|
|
- name: Deploy to GitHub Pages
|
|
uses: crazy-max/ghaction-github-pages@v4
|
|
with:
|
|
target_branch: gh-pages
|
|
build_dir: docs/build
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|