Add workflow (sans the deployment)
Ref: https://vitepress.dev/reference/cli
This commit is contained in:
parent
10b5771445
commit
e3f2a77d2c
1 changed files with 35 additions and 0 deletions
35
.github/workflows/docs-deploy.yml
vendored
Normal file
35
.github/workflows/docs-deploy.yml
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
name: "Deploy (docs)"
|
||||
|
||||
on:
|
||||
# Run on every push to main that changes docs/
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- "docs/**"
|
||||
- ".github/workflows/web-lint.yml"
|
||||
# Also allow manually running the action
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: docs
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup node and enable yarn caching
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: "yarn"
|
||||
cache-dependency-path: "docs/yarn.lock"
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn install
|
||||
|
||||
- name: Build production site
|
||||
# Will create docs/.vitepress/dist
|
||||
run: yarn build
|
Loading…
Add table
Reference in a new issue