Merge pull request #46 from dmgav/test #55
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 Docs | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
if: github.repository_owner == 'bluesky' | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
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 dependencies | |
run: | | |
sudo apt install redis | |
# Versioneer uses the most recent git tag to generate __version__, which appears | |
# in the published documentation. | |
git fetch --tags | |
# These packages are installed in the base environment but may be older | |
# versions. Explicitly upgrade them because they often create | |
# installation problems if out of date. | |
python -m pip install --upgrade pip setuptools numpy | |
pip install . | |
pip install -r requirements-dev.txt | |
pip list | |
- name: Build Docs | |
run: | | |
make -C docs/ html | |
- name: Deploy documentation to blueskyproject.io | |
# 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: | |
deploy_key: ${{ secrets.ACTIONS_DOCUMENTATION_DEPLOY_KEY }} | |
publish_branch: master | |
publish_dir: ./docs/build/html | |
external_repository: bluesky/bluesky.github.io | |
destination_dir: bluesky-queueserver-api | |
keep_files: true # Keep old files. | |
force_orphan: false # Keep git history. |