Fix release title in docs deployment to GitHub pages (#98) #18
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: docs | |
on: | |
push: | |
tags: | |
- 'v*' | |
concurrency: | |
group: 'github-pages' | |
cancel-in-progress: true | |
env: | |
NUMBA_NUM_THREADS: 1 | |
MPLBACKEND: Agg | |
jobs: | |
docs: | |
runs-on: [self-hosted, x64, Linux, ubuntu, generic] | |
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | |
permissions: | |
pages: write # to deploy to Pages | |
id-token: write # to verify the deployment originates from an appropriate source | |
# Deploy to the github-pages environment | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Workaround for https://github.com/actions/checkout/issues/882 | |
run: git fetch --tags --force origin | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10.9" | |
- name: Update pip | |
run: | | |
python -m pip install --upgrade pip | |
- name: Install required packages | |
run: | | |
sudo apt-get -y install pandoc make | |
- name: Install doc dependencies | |
run: | | |
pip install -e .[doc] | |
python -c 'import iop4lib; print(iop4lib.__version__)' | |
- name: Use mounted astrometry index files | |
run: | | |
ln -s /mnt/astrometry_cache $HOME/.astrometry_cache | |
- name: Check astrometry index files were correctly mounted | |
run: ls $HOME/.astrometry_cache/5200/index-5200-00.fits | |
- name: Download test data | |
env: | |
TEST_DATA_PASSWORD: ${{ secrets.test_data_password }} | |
run: | | |
export TESTDATA_MD5SUM=`grep 'TESTDATA_MD5SUM' ./tests/conftest.py | awk -F"'" '{print $2}' | tr -d '\n'` | |
wget --post-data "pass=$TEST_DATA_PASSWORD" "https://vhega.iaa.es/iop4/iop4testdata.tar.gz?md5sum=$TESTDATA_MD5SUM" -O $HOME/iop4testdata.tar.gz | |
- name: Extract test data in the default data folder | |
run: | | |
tar -xzf $HOME/iop4testdata.tar.gz -C $HOME | |
mv $HOME/iop4testdata $HOME/.iop4data | |
- name: Create the DB | |
run: | | |
python iop4site/manage.py makemigrations | |
python iop4site/manage.py makemigrations iop4api | |
python iop4site/manage.py migrate --no-input | |
python iop4site/manage.py loaddata $HOME/.iop4data/testcatalog.yaml | |
ls -lh $HOME/.iop4data/ | |
- name: Run iop4 on the test data | |
run: iop4 --list-local | |
- name: Build docs | |
run: make docs-sphinx | |
- name: Upload Pages artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
name: github-pages | |
path: docs/_build/html | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |