Merge branch 'production' of https://github.com/NOAA-ORR-ERD/adios_oi… #72
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: Deploy API Docs | |
on: | |
# Trigger the workflow on push request, | |
# but only for the production branch | |
push: | |
branches: | |
- production | |
jobs: | |
build: | |
name: Build Sphinx Pages | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.11 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip setuptools | |
python -m pip install -r adios_db/docs_requirements.txt | |
- name: Build the docs | |
run: | | |
cd adios_db | |
python -m pip install ./ | |
cd Documentation/API_docs/ | |
./build_api_docs.sh | |
make html | |
ls ../../../docs || mkdir ../../../docs | |
rm -rf ../../../docs/* | |
cp -R build/html/* ../../../docs | |
cp build/html/.nojekyll ../../../docs | |
pushd ../../../docs | |
git config --global user.email "gihub_actions@nothing.com" | |
git config --global user.name "GitHub Actions" | |
git add -A | |
git commit -m "update published docs" | |
popd | |
- name: Deploy Files | |
run: | | |
# git config user.name ${{ secrets.GH_USER }} | |
# git config user.email "${{ secrets.GH_MAIL }}" | |
git remote add gh-token "https://${{ secrets.GH_TOKEN}}@github.com/:user/:repo.git" | |
git push | |
# # git fetch gh-token && git fetch gh-token gh-pages:gh-pages | |
# # python -m mkdocs gh-deploy -v --clean --remote-name gh-token | |
# # git push gh-token gh-pages | |
# - name: Push the docs | |
# run: | | |
# # github_token: ${{ secrets.GITHUB_TOKEN }} | |
# git push |