-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
version: 2 | ||
|
||
jobs: | ||
docs-build: | ||
docker: | ||
- image: python:3.7 | ||
steps: | ||
- checkout | ||
- run: | ||
name: Install dependencies | ||
command: | | ||
apt-get update | ||
apt-get install --no-install-recommends -y texlive-base texlive-latex-base texlive-latex-recommended texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra texlive-formats-extra texlive-bibtex-extra texlive-humanities texlive-lang-italian texinfo texlive-science latexmk | ||
apt-get autoremove | ||
apt-get clean | ||
rm -rf /var/lib/apt/lists/* | ||
- run: | ||
name: Compile SPHINX | ||
command: | | ||
pip install -r requirements.txt | ||
make html | ||
make latexpdf | ||
cp _build/latex/*.pdf _build/html/ | ||
make epub | ||
cp _build/epub/*.epub _build/html/ | ||
touch _build/html/.nojekyll | ||
- persist_to_workspace: | ||
root: _build | ||
paths: | ||
- html | ||
docs-deploy: | ||
docker: | ||
- image: node:8.10.0 | ||
steps: | ||
- add_ssh_keys: | ||
fingerprints: | ||
- "50:c0:de:85:b0:a3:35:40:b1:29:2e:a7:c1:04:bf:09" | ||
- checkout | ||
- attach_workspace: | ||
at: _build | ||
- run: | ||
name: Install and configure dependencies | ||
command: | | ||
npm install -g --silent gh-pages@2.0.1 | ||
git config user.email "marco.spasiano@gmail.com" | ||
git config user.name "marco.spasiano" | ||
- run: | ||
name: Deploy docs to gh-pages branch | ||
command: gh-pages --dist _build/html | ||
workflows: | ||
version: 2 | ||
build-and-deploy: | ||
jobs: | ||
- docs-build: | ||
filters: | ||
branches: | ||
only: master | ||
- docs-deploy: | ||
requires: | ||
- docs-build | ||
filters: | ||
branches: | ||
only: master |