-
-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (42 loc) · 1.18 KB
/
ci-documentation.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
name: documentation
on:
push:
tags:
- v*
- doc*
branches: [main]
pull_request:
branches: [main, "doc/*"]
jobs:
gh-release:
env:
DOC_FOLDER: "./docs"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: webfactory/ssh-agent@v0.5.0
with:
ssh-private-key: ${{ secrets.GH_PAGES_DEPLOY }}
- name: Setup Node 🔧
uses: actions/setup-node@v1
with:
node-version: "20.x"
cache: "npm"
cache-dependency-path: ./docs/package-lock.json
path: $DOC_FOLDER
- name: Restore Dependencies 📦
working-directory: ${{ env.DOC_FOLDER }}
run: npm install --force
- name: Build ⚙️
working-directory: ${{ env.DOC_FOLDER }}
run: npm run build
- name: Publish to GitHub Pages ✉️
if: startsWith(github.ref, 'refs/tags/v')
working-directory: ${{ env.DOC_FOLDER }}
env:
USE_SSH: true
GIT_USER: git
run: |
git config --global user.email ${{secrets.OWNER_USER_EMAIL}}
git config --global user.name ${{secrets.OWNER_USER}}
npm run deploy