-
Notifications
You must be signed in to change notification settings - Fork 13
55 lines (45 loc) · 1.49 KB
/
build_indev_docs.yml
File metadata and controls
55 lines (45 loc) · 1.49 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
name: Build Indev Docs
on:
push:
branches:
- master
jobs:
build:
name: Build indev docs
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v1
- name: Install Node v14
uses: actions/setup-node@v1
with:
node-version: 14
- name: Install dependencies
run: |
npm install
- name: Clone gh-pages branch
run: git clone https://${{ github.actor }}:${{ secrets.DOCS_TOKEN }}@github.com/${{ github.repository }}.git -b gh-pages ../yamdbf-docs
- name: Build project and run localization doc generation script
run: |
npm run build
npm run localization
- name: Switch to node v8.9.3
uses: actions/setup-node@v1
with:
node-version: 8.9.3
- name: Build docs
run: npm run docs:indev
- name: Check if commit is needed
id: git_status
run: |
cd ../yamdbf-docs
echo "##[set-output name=status;]$(git status | grep 'nothing to commit')"
- name: Make commit and push
if: contains(steps.git_status.outputs.status, 'nothing to commit') != true
run: |
cd ../yamdbf-docs
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor}}@users.noreply.github.com"
git add --all
git commit -m "Build docs from master: ${{ github.sha }}"
git push origin gh-pages