-
Notifications
You must be signed in to change notification settings - Fork 227
62 lines (52 loc) · 1.77 KB
/
Copy pathdeploy-docs.yml
File metadata and controls
62 lines (52 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Deploy Docs
permissions: {}
on:
push:
branches: [main]
paths:
- 'docs/**'
- 'packages/cli/install.sh'
- 'packages/cli/install.ps1'
- '.github/workflows/deploy-docs.yml'
workflow_dispatch:
concurrency:
group: deploy-docs
cancel-in-progress: false
defaults:
run:
shell: bash
jobs:
deploy:
if: github.repository == 'voidzero-dev/vite-plus'
runs-on: ubuntu-latest
permissions:
contents: read
env:
VOID_PROJECT: viteplus
steps:
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b # v1.4.2
- uses: voidzero-dev/setup-vp@250f29ce396baf5e8f24498e17c0dfdebabc26eb # main
with:
cache: true
working-directory: docs
cache-dependency-path: docs/pnpm-lock.yaml
- name: Restore docs Vite Task cache
id: vite-task-cache
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: docs/node_modules/.vite/task-cache
key: vite-task-docs-${{ runner.os }}-${{ runner.arch }}-main-${{ github.sha }}
# Restore the latest main cache; Vite Task fingerprints decide reuse.
restore-keys: |
vite-task-docs-${{ runner.os }}-${{ runner.arch }}-main-
- run: vp run build
working-directory: docs
- name: Save docs Vite Task cache
if: success() && steps.vite-task-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: docs/node_modules/.vite/task-cache
key: ${{ steps.vite-task-cache.outputs.cache-primary-key }}
- run: vpx void deploy --dir docs/.vitepress/dist
env:
VOID_TOKEN: ${{ secrets.VOID_TOKEN }}