-
Notifications
You must be signed in to change notification settings - Fork 92
39 lines (35 loc) · 1008 Bytes
/
main.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
name: Build and Deploy Gitbook
on:
push:
branches:
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Setup Node JS 🚢
uses: actions/setup-node@v1
with:
node-version: "10.x"
- name: Checkout Repository 🛎️
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Install and Build 🔧
run: |
echo "Installing Gitbook CLI"
sudo npm install gitbook-cli -g
echo "Changing directory to gitbook"
cd gitbook
echo "Installing Gitbook Plugins"
gitbook install
echo "Building Gitbook"
gitbook build . ../build
echo "Removing node_modules directory"
git clean -fx node_modules
- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: gh-pages
FOLDER: build