-
-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (40 loc) · 1.29 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
name: Publish documentation
on:
push:
branches:
- main
tags:
- v[0-9]+.[0-9]+.[0-9]+*
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.5.3
- name: Fetch all git branches
run: git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
- uses: actions/setup-node@v3.7.0
with:
node-version: 14.x
- name: Get npm cache directory
id: npm-cache-dir
run: |
echo "::set-output name=dir::$(npm config get cache)"
- name: Restore npm cache
id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
uses: actions/cache@v3.3.1
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.OS }}-node-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.OS }}-node-
- run: npm install --engine-strict
- run: npm run docs
- uses: malept/github-action-gh-pages@v1.3.0
with:
defaultBranch: main
docsPath: docs
gitCommitMessage: "Publish [skip ci]"
showUnderscoreFiles: true
versionDocs: true
env:
GH_PAGES_SSH_DEPLOY_KEY: ${{ secrets.DOCS_SSH_DEPLOY_KEY }}