Skip to content

update deploy docs script #3

update deploy docs script

update deploy docs script #3

Workflow file for this run

name: Deploy Documentation
on:
workflow_dispatch:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Add Poetry to PATH
run: echo "${HOME}/.local/bin" >> $GITHUB_PATH
- name: Install dependencies
run: poetry install --with docs --extras jax
- name: Build Sphinx documentation
run: poetry run sphinx-build -b html docs docs/build/html
- name: Clone fkeruzore.github.io using HTTPS
run: |
git clone https://github.com/fkeruzore/fkeruzore.github.io.git
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Copy built docs
run: |
rsync -av --delete docs/build/html/ fkeruzore.github.io/picasso/
- name: Commit and push changes to fkeruzore.github.io
run: |
cd fkeruzore.github.io
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git add picasso/
git commit -m "Update picasso documentation"
git push origin main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}