-
-
Notifications
You must be signed in to change notification settings - Fork 89
68 lines (60 loc) · 1.9 KB
/
docs.yml
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
68
name: Release Docs
on:
push:
tags:
- '*'
jobs:
deploy:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true
- name: Build Documentation
run: |
cd docs
hugo
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '17'
- name: Setup yarn
run: npm install -g yarn
- name: set config
id: config-1
run: git config --global url."https://github.com".insteadOf git://github.com
- name: set config 2
id: config-2
run: git config --global url."https://".insteadOf git://
- name: set config 3
id: config-3
run: git config --global url."https://github.com/".insteadOf ssh://[email protected]
- name: Setup dependencies
run: yarn
- name: Create coverage summary
run: |
SUMMARY="$(yarn test --coverage --coverageReporters=text-summary | tail -3 | head -1)"
TOKENS=($SUMMARY)
echo "COVERAGE=$(echo ${TOKENS[2]})" >> $GITHUB_ENV
- name: Create Coverage Badge
uses: schneegans/[email protected]
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: a2879612aa47b6364392d94cae882c50
filename: obsidian-advanced-slides_coverage.json
label: coverage
message: ${{ env.COVERAGE }}
color: brightgreen
- name: Create coverage report
run: yarn test --coverage
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/public