Fix/pytorch vulnerability update (#32) #8
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: Build stable documentation | |
on: | |
push: | |
tags: | |
- '*.*.*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set env | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- name: "Set up Python 3.11" | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: "Install pandoc" | |
run: | | |
sudo apt-get install -y pandoc | |
- name: Install AISee package and dependecies | |
run: | | |
pip install poetry | |
poetry install --with docs | |
- name: Build latest documentation | |
run: | | |
cd docs/ | |
make copy-examples | |
make html-poetry | |
- name: Switch to gh-pages branch | |
run: git checkout gh-pages | |
- name: Copy documentation to the stable folder of gh-pages | |
run: | | |
rm -rf stable/ | |
mkdir stable/ | |
cp -r docs/build/html/* stable | |
- name: Copy documentation to the tag folder of gh-pages | |
run: | | |
mkdir ${{ env.RELEASE_VERSION }}/ | |
cp -r docs/build/html/* ${{ env.RELEASE_VERSION }} | |
- name: Add username and user email | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
- name: Add dev directory | |
run: | | |
git add stable/* | |
git add ${{ env.RELEASE_VERSION }}/* | |
- name: Commit and push documentation | |
run: (git commit -m "Add ${{ env.RELEASE_VERSION }} documentation" && git push) || echo "Nothing to commit" | |