forked from nf-core/tools
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (47 loc) · 1.55 KB
/
tools-api-docs-dev.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: nf-core/tools dev API docs
# Run on push and PR to test that docs build
on:
push:
branches:
- dev
paths-ignore:
- "CHANGELOG.md"
pull_request:
paths-ignore:
- "CHANGELOG.md"
release:
types: [published]
# Cancel if a newer run is started
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
api-docs:
name: Build & push Sphinx API docs
runs-on: self-hosted
steps:
- name: Check out source-code repository
uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install python dependencies
run: |
pip install --upgrade pip
pip install -r ./docs/api/requirements.txt
pip install .
- name: Build HTML docs
run: make --directory ./docs/api html
- name: Sync dev docs
# Only sync with the website if it was a push from nf-core/tools dev branch
if: github.repository == 'nf-core/tools' && github.event_name == 'push' && github.event.ref == 'refs/heads/dev'
uses: SamKirkland/[email protected]
with:
server: ${{ secrets.ftp_server }}
username: ${{ secrets.ftp_username}}
password: ${{ secrets.ftp_password }}
local-dir: "./docs/api/_build/html/"
server-dir: ${{ secrets.ftp_server_old_site_dir }}/dev/
protocol: ${{ secrets.ftp_protocol }}
port: ${{ secrets.ftp_port }}