mirror of
https://github.com/gnmyt/myspeed.git
synced 2026-02-10 15:49:42 -06:00
36 lines
809 B
YAML
36 lines
809 B
YAML
name: Deploy documentation to GitHub
|
|
on:
|
|
push:
|
|
branches: [ "development" ]
|
|
paths:
|
|
- "docs/**"
|
|
- ".github/workflows/upload_docs.yml"
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: docs
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: npm
|
|
cache-dependency-path: docs/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Build documentation
|
|
run: npx vitepress build
|
|
|
|
- name: Deploy to GitHub Pages
|
|
uses: peaceiris/actions-gh-pages@v4
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_dir: docs/.vitepress/dist |