Merge pull request #44 from J-avery32/main #73
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: Publish Documentation | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8] | |
fail-fast: false | |
steps: | |
- name: Set env.REPOSITORY_NAME # just the repo, as opposed to org/repo | |
shell: bash -l {0} | |
run: | | |
export REPOSITORY_NAME=${GITHUB_REPOSITORY#*/} | |
echo "REPOSITORY_NAME=${REPOSITORY_NAME}" >> $GITHUB_ENV | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 1000 # should be enough to reach the most recent tag | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install | |
shell: bash -l {0} | |
run: source continuous_integration/scripts/install.sh | |
- name: Install documentation-building requirements | |
shell: bash -l {0} | |
run: | | |
set -vxeuo pipefail | |
python -m pip install .[dev] | |
python -m pip list | |
- name: Build Docs | |
shell: bash -l {0} | |
run: make -C docs/ html | |
- name: list | |
run: | | |
ls -al /home/runner/work/pyscicat/pyscicat/docs/build | |
- name: Deploy documentation | |
# We pin to the SHA, not the tag, for security reasons. | |
# https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions | |
uses: peaceiris/actions-gh-pages@bbdfb200618d235585ad98e965f4aafc39b4c501 # v3.7.3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_branch: gh-pages | |
publish_dir: ./docs/build/html | |
destination_dir: docs/build | |
keep_files: true # Keep old files. | |
force_orphan: false # Keep git history. |