Repository navigation
67 lines (55 loc) · 1.59 KB
/
Copy pathdeploy-docs.yml
File metadata and controls
67 lines (55 loc) · 1.59 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
63
64
65
66
67
name: Deploy Documentation
permissions:
contents: write
env:
VJOBS: '2'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
- main
jobs:
deploy-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout VSL
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
path: vsl
- name: Setup V
uses: vlang/setup-v@663cc08827d1fc0532ee755b4dedbb183c11d06a # v1.7
with:
version: ba41fa121b738a1a694e0050401a45d2376e09b9
- name: Copy VSL to V Modules
run: |
mkdir -p ~/.vmodules
cp -a ./vsl ~/.vmodules/vsl
- name: V doctor
env:
VJOBS: '2'
run: |
cd ~/.vmodules
env HOME="$HOME" PATH="$PATH" VJOBS=2 v doctor
- name: Build docs
run: |
cd ~/.vmodules/vsl
rm -rf examples
rm -f README.md
mv static/DOCS.md README.md
cd ~/.vmodules
env HOME="$HOME" PATH="$PATH" VJOBS=2 \
v doc -readme -m -f html ./vsl
- name: Stage website and generated API docs
run: |
rm -rf ./vsl/_site
mkdir -p ./vsl/_site/api
cp -a ./vsl/website/. ./vsl/_site/
cp -a ~/.vmodules/vsl/_docs/. ./vsl/_site/api/
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./vsl/_site/