Skip to content

Commit 2a121b3

Browse files
committed
Split doc building into its own workflow
1 parent 1563b18 commit 2a121b3

File tree

3 files changed

+48
-18
lines changed

3 files changed

+48
-18
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ jobs:
4141
- name: Install
4242
run: |
4343
python -m pip install --no-cache-dir -r requirements-dev.txt
44+
- name: Run linter
45+
run: |
46+
invoke lint
4447
- name: Run tests
4548
run: |
4649
invoke test

.github/workflows/docs.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: docs
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
build:
13+
name: build and deploy docs
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up Python 3.8
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: 3.8
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
python -m pip install cython --install-option="--no-cython-compile"
25+
- name: Install
26+
run: |
27+
python -m pip install --no-cache-dir -r requirements-dev.txt
28+
- name: Get branch/tag name
29+
id: get-branch
30+
uses: ypicard/get-branch-name-github-action@v1
31+
- name: Generate docs
32+
if: ${{ success() }}
33+
run: |
34+
invoke docs
35+
mkdir -p deploy/compas_fab/${{ steps.get-branch.outputs.tag }} && mv -T dist/docs deploy/compas_fab/${{ steps.get-branch.outputs.tag }}/
36+
- name: Deploy docs
37+
if: success()
38+
uses: crazy-max/ghaction-github-pages@v2
39+
with:
40+
repo: gramaziokohler/gramaziokohler.github.io
41+
target_branch: master
42+
build_dir: deploy
43+
keep_history: true
44+
env:
45+
GH_PAT: ${{ secrets.GH_PAT }}

.github/workflows/integration.yml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,28 +30,10 @@ jobs:
3030
- name: Install
3131
run: |
3232
python -m pip install --no-cache-dir -r requirements-dev.txt
33-
- name: Run linter
34-
run: |
35-
invoke lint
3633
- name: Run integration tests
3734
run: |
3835
invoke test --doctest --codeblock
3936
- name: Tear down docker containers
4037
run: |
4138
docker-compose -f "docs/backends/files/ur5-demo/docker-compose.yml" down
4239
docker rm -f vrep_rfl
43-
- name: Generate docs
44-
if: ${{ success() }}
45-
run: |
46-
invoke docs
47-
mkdir -p deploy/compas_fab/edge && mv -T dist/docs deploy/compas_fab/edge/
48-
- name: Deploy docs
49-
if: success()
50-
uses: crazy-max/ghaction-github-pages@v2
51-
with:
52-
repo: gramaziokohler/gramaziokohler.github.io
53-
target_branch: master
54-
build_dir: deploy
55-
keep_history: true
56-
env:
57-
GH_PAT: ${{ secrets.GH_PAT }}

0 commit comments

Comments
 (0)