Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build Docs

on:
push:
branches: [ main, dev ]
tags: [ v* ]

jobs:
deploy-docs:
runs-on: ubuntu-latest
permissions:
contents: write
strategy:
fail-fast: false

steps:
- name: Checkout DesignerDNA Project
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: .python-version-default

- name: Install dependencies
run: |
python -m pip install -U pip
pip install wheel setuptools
pip install ".[doc]"

- name: Build documentation
run: |
sphinx-multiversion docs/source _build

- name: Add Redirect Page
# NOTE: when only one version is built, it is not within a separate directory
if: ${{ hashFiles('_build/index.html') == '' }}
run: |
cp docs/source/_templates/redirect.html _build/index.html

- name: Deploy to Github Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_build
publish_branch: gh-pages
force_orphan: true
37 changes: 37 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries

name: Upload Python Package

on:
release:
types: [published]

permissions:
contents: read

jobs:
deploy:
runs-on: ubuntu-latest
if: github.event_name == 'release'

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install -U pip --disable-pip-version-check
python -m pip install setuptools wheel build

- name: Build package
run: python -m build

- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
Loading