Skip to content

Merge pull request #2405 from mirpedrol/tweet-gha #344

Merge pull request #2405 from mirpedrol/tweet-gha

Merge pull request #2405 from mirpedrol/tweet-gha #344

name: nf-core/tools dev API docs
# Run on push and PR to test that docs build
on:
push:
branches:
- dev
pull_request:
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
steps:
- name: Check out source-code repository
uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- 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 }}