-
Notifications
You must be signed in to change notification settings - Fork 7
53 lines (49 loc) · 1.45 KB
/
Copy pathgitbook-action.yml
File metadata and controls
53 lines (49 loc) · 1.45 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
name: Deploy DCM User Guide
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Cache node modules
uses: actions/cache@v1
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Checkout gh-pages
uses: actions/checkout@v2
with:
repository: Dronecode/camera-manager.dronecode.org
path: "./gh-pages/"
- run: ls -l ./gh-pages/master
- name: Checkout Book
uses: actions/checkout@v2
with:
path: "./book/"
- name: Setting-up Book
uses: actions/setup-node@v1
- run: ls -l
- run: npm install gitbook-cli --global
- run: gitbook install ./book
- run: gitbook build ./book ./gh-pages/master
- run: ls -l ./gh-pages/master
- name: Deploying book to gh-pages repo
uses: EndBug/add-and-commit@v4
with:
#author_name: PX4BuildBot
#author_email: px4buildbot@px4.io
author_name: mrpollo
author_email: mrpollo@gmail.com
message: "gitbook build update ${{ env.BUILD_DATE }}"
cwd: "./gh-pages/"
add: "master"
env:
GITHUB_TOKEN: ${{ secrets.PX4BOT_TOKEN }}
BUILD_DATE: echo `date`