forked from nexusformat/definitions
-
Notifications
You must be signed in to change notification settings - Fork 8
49 lines (47 loc) · 1.28 KB
/
fairmat-build-pages.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
43
44
45
46
47
48
49
name: GH pages fairmat proposal
on:
push:
branches: [fairmat]
pull_request:
branches: [fairmat]
jobs:
pages:
runs-on: ubuntu-20.04
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: install dependencies
run: pip install -r requirements.txt
- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v7
- name: test
run: make test
- name: prepare
run: make prepare
- name: html
run: make html
- name: Deploy
if: steps.branch-name.outputs.is_default == 'true'
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
folder: build/manual/build/html
branch: fairmat-docs
target-folder: docs
clean: false
- name: Deploy PR
if: steps.branch-name.outputs.is_default == 'false'
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
folder: build/manual/build/html
branch: fairmat-docs
target-folder: docs/${{ steps.branch-name.outputs.current_branch }}
clean: false