44 lines
858 B
YAML
44 lines
858 B
YAML
name: deploy
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- "docs/**"
|
|
- ".github/workflows/deploy.yml"
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: "npm"
|
|
cache-dependency-path: docs/package-lock.json
|
|
|
|
- name: Install dependencies in docs
|
|
run: |
|
|
cd docs
|
|
npm install
|
|
|
|
- name: Build docs
|
|
run: |
|
|
cd docs
|
|
npm run docs:build
|
|
|
|
- name: Deploy to GitHub Pages
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_dir: docs/.vitepress/dist
|
|
cname: clice.io
|