Update conf.py #230
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: Main | |
on: | |
push: | |
branches: | |
- master | |
- develop | |
- feature/* | |
tags: | |
- '**' | |
pull_request: | |
workflow_dispatch: | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
checks: write | |
pull-requests: write | |
jobs: | |
test: | |
uses: ./.github/workflows/test.yaml | |
lint: | |
uses: ./.github/workflows/lint.yaml | |
release: | |
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/p/plotly-gtk # Replace <package-name> with your PyPI project name | |
permissions: | |
contents: write | |
id-token: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
cache: 'pip' | |
- name: Build | |
run: pip install build && python -m build | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: dist/* | |
- name: Publish to PyPI | |
if: always() | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
# Build job | |
build-docs: | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
cache: 'pip' | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
- name: Install apt packages | |
run: | | |
sudo apt update | |
sudo apt install libgirepository1.0-dev libcairo2-dev pkg-config python3-dev gir1.2-gtk-4.0 gir1.2-adw-1 gir1.2-webkit-6.0 make graphviz | |
- name: Install python packages | |
run: | | |
pip install wheel | |
pip install -e .[doc] | |
- name: Get demo artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: demo-${{ github.sha }} | |
path: sphinx/source/examples | |
- name: Get report artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: report | |
path: sphinx/source/prebuilt | |
- name: Build pages | |
run: | | |
cd sphinx | |
make html | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: sphinx/build/html | |
deploy-docs: | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
if: github.ref_name == 'master' | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build-docs | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |