Template: Fix GitHub Actions CI and Linting badges links #4441
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: ubuntu-latest | |
steps: | |
- name: Check out source-code repository | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5 | |
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/FTP-Deploy-Action@8a24039354ee91000cb948cb4a1dbdf1a1b94a3c # v4.3.4 | |
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 }} |