-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split package and docs build and fix dependency install
- Loading branch information
1 parent
1ebce4e
commit 4c762d2
Showing
2 changed files
with
40 additions
and
33 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Build & Publish Package | ||
|
||
on: | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-and-publish-docs: | ||
name: Build and publish docs | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.inputs.docs == 'true' }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
cache: pip | ||
cache-dependency-path: requirements*.txt | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -r requirements.txt | ||
python -m pip install -r requirements-dev.txt | ||
- name: Build docs | ||
run: mkdocs build | ||
|
||
- name: Publish docs | ||
uses: JamesIves/[email protected] | ||
with: | ||
branch: docs | ||
folder: site |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,12 +3,6 @@ name: Build & Publish Package | |
on: | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
inputs: | ||
docs: | ||
description: 'Builds and publishes docs after building and publishing the package. Default is true.' | ||
required: false | ||
default: 'true' | ||
|
||
jobs: | ||
build-release: | ||
|
@@ -21,11 +15,14 @@ jobs: | |
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
cache: pip | ||
cache-dependency-path: requirements*.txt | ||
|
||
- name: Install packages | ||
run: | | ||
python -m pip install --upgrade pip build | ||
python -m pip install --upgrade --upgrade-strategy eager -e ".[dev]" | ||
python -m pip install -r requirements.txt | ||
python -m pip install -r requirements-dev.txt | ||
- name: Build a binary wheel and a source tarball | ||
run: | | ||
|
@@ -55,29 +52,3 @@ jobs: | |
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
verbose: true | ||
|
||
build-and-publish-docs: | ||
name: Build and publish docs | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.inputs.docs == 'true' }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
cache: pip | ||
cache-dependency-path: Pipfile | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install --upgrade --upgrade-strategy eager -e ".[dev]" | ||
mkdocs build | ||
- name: Publish docs | ||
uses: JamesIves/[email protected] | ||
with: | ||
branch: docs | ||
folder: site |