Skip to content

Commit

Permalink
new github action to deploy docs
Browse files Browse the repository at this point in the history
  • Loading branch information
onadegibert committed May 15, 2024
1 parent c3f9538 commit 2c556be
Showing 1 changed file with 23 additions and 26 deletions.
49 changes: 23 additions & 26 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,29 @@ on:
push:
branches:
- multi-ftt # needs to be updated
tags:
- '*'
permissions:
contents: read
pages: write
id-token: write
jobs:
build-and-deploy-docs:
build:
runs-on: ubuntu-latest
needs: [build-n-test]
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies to build docs
run: |
python -m pip install --upgrade pip
python -m pip install wheel
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
python -m pip install .[docs]
- name: Build docs
run: |
sphinx-build docs docs/build
- name: Deploy docs
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: docs/build
clean: true
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Build
uses: actions/jekyll-build-pages@v1
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

0 comments on commit 2c556be

Please sign in to comment.