Sync LOKI 3.0.0 #13
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 and Deploy Docs-Dev | |
on: | |
push: | |
branches: | |
- development # The workflow will be triggered on pushes to the 'development' branch | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
# 1. Checkout the code from the 'development' branch | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 # Only the last commit is needed for the workflow | |
# 2. Set up Python environment | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 # Same as the version of Python required in project | |
# 3. Install dependencies using Poetry | |
- name: Install dependencies | |
run: | | |
pip install poetry | |
poetry install | |
poetry add --group dev sphinx sphinx-rtd-theme | |
source $(poetry env info --path)/bin/activate | |
# 4. Build the Sphinx documentation | |
- name: Build Docs | |
working-directory: docs-dev | |
run: | | |
sphinx_exec=$(poetry env info --path)/bin/sphinx-build | |
make SPHINXBUILD=$sphinx_exec html | |
# 5. Deploy to the 'gh-pages' branch | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_branch: gh-pages # Corrigido: Branch de destino para o deploy | |
publish_dir: docs-dev/_build/html # Pasta com os arquivos HTML gerados | |
# keep_files: true # Opcional: mantém arquivos antigos no destino (se necessário) |