forked from nf-core/tools
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (42 loc) · 1.36 KB
/
tools-api-docs-release.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
name: nf-core/tools release API docs
on:
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: ubuntu-latest
strategy:
matrix:
dir:
- latest
- ${{ github.event.release.tag_name }}
steps:
- name: Check out source-code repository
uses: actions/checkout@v3
- 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 release docs
if: github.repository == 'nf-core/tools'
uses: SamKirkland/FTP-Deploy-Action@4.0.0
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 }}/${{ matrix.dir }}/
protocol: ${{ secrets.ftp_protocol }}
port: ${{ secrets.ftp_port }}