Skip to content

Commit

Permalink
add github hash to artifact uploaded by docs build
Browse files Browse the repository at this point in the history
  • Loading branch information
niksirbi committed Nov 22, 2024
1 parent e9d4f1f commit cdc5215
Showing 1 changed file with 50 additions and 1 deletion.
51 changes: 50 additions & 1 deletion .github/workflows/docs_build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,56 @@ jobs:
needs: linting
runs-on: ubuntu-latest
steps:
- uses: neuroinformatics-unit/actions/build_sphinx_docs@v2
- uses: actions/checkout@v4

# Need the tags so that setuptools-scm can form a valid version number
- name: Fetch git tags
run: git fetch origin 'refs/tags/*:refs/tags/*'

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}

- name: Upgrade pip
shell: bash
run: |
# install pip=>20.1 to use "pip cache dir"
python3 -m pip install --upgrade pip
- name: Get pip cache dir
shell: bash
id: pip-cache
run: echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT

- name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
shell: bash
run: python3 -m pip install -r ./docs/requirements.txt

- name: Check links
shell: bash
run: |
sphinx-build docs/source docs/build -b linkcheck
# needs to have sphinx.ext.githubpages in conf.py extensions list
- name: Building documentation
shell: bash
run: |
sphinx-build docs/source docs/build -b html -W --keep-going
- name: Upload the content for deployment
uses: actions/upload-artifact@v4
with:
name: docs-${{ github.sha }}
path: ./docs/build/

deploy_sphinx_docs:
name: Deploy Sphinx Docs
Expand Down

0 comments on commit cdc5215

Please sign in to comment.