-
Notifications
You must be signed in to change notification settings - Fork 40
42 lines (37 loc) · 1.75 KB
/
pagesdeploy.yaml
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: Build and Deploy
on: [push, pull_request]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/[email protected]
with:
persist-credentials: false
- name: Install and Build 🔧
run: |
sudo apt update
sudo apt install python3-pip python3-setuptools
sudo pip3 install pymavlink
sudo pip3 install pylint
sudo pip3 install isort==4.3.21
sudo npm install gitbook-cli -g
# fix polyfill issue in gitbook
sudo sed -i "/fs.stat = statFix(fs.stat)/c\\" /usr/local/lib/node_modules/gitbook-cli/node_modules/npm/node_modules/graceful-fs/polyfills.js
sudo sed -i "/fs.fstat = statFix(fs.fstat)/c\\" /usr/local/lib/node_modules/gitbook-cli/node_modules/npm/node_modules/graceful-fs/polyfills.js
sudo sed -i "/fs.lstat = statFix(fs.lstat)/c\\" /usr/local/lib/node_modules/gitbook-cli/node_modules/npm/node_modules/graceful-fs/polyfills.js
sudo gitbook install
gitbook build
# Disables:
# - line-too-long (because of long output comments at the end)
# - invalid-constant-name (because our variables are not supposed constants)
# - duplicate-code (because some snippets have the same snippet duplicated)
pylint --disable=R0801 --disable=C0103 --disable=C0301 --disable=C0209 developers/pymavlink/*
- name: Deploy 🚀
uses: JamesIves/[email protected]
if: github.ref == 'refs/heads/master'
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: _book
CLEAN: false # Don't Automatically remove deleted files from the deploy branch