-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9d1fa4d
commit 6965acf
Showing
20 changed files
with
350 additions
and
134 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
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 |
---|---|---|
@@ -1,31 +1,40 @@ | ||
--- | ||
name: Auto-deployment of cmdr Documentation | ||
on: | ||
push: | ||
branches: [ main ] | ||
branches: [main] | ||
|
||
jobs: | ||
build-docs: | ||
runs-on: ubuntu-latest | ||
|
||
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | ||
permissions: | ||
contents: write # to let mkdocs write the new docs | ||
pages: write # to deploy to Pages | ||
id-token: write # to verify the deployment originates from an appropriate source | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@main | ||
with: | ||
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo | ||
|
||
- name: Set up Python 3. | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: 3.9 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo | ||
|
||
- name: Set up Python. | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Install Poetry. | ||
run: pipx install poetry | ||
|
||
- name: Install Poetry. | ||
uses: snok/install[email protected] | ||
- name: Install dependencies. | ||
run: poetry install -E docs | ||
|
||
- name: Install dependencies. | ||
run: poetry install -E docs | ||
|
||
- name: Build documentation. | ||
run: | | ||
mkdir -p docs | ||
touch docs/.nojekyll | ||
poetry run gen-doc -d docs src/cmdr/schema/cmdr.yaml | ||
poetry run mkdocs gh-deploy | ||
- name: Build documentation. | ||
run: | | ||
mkdir -p docs | ||
touch docs/.nojekyll | ||
make gendoc | ||
([ ! -f docs/about.md ] && cp src/docs/about.md docs/) || true | ||
make mkd-gh-deploy |
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
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
name: Publish Python Package | ||
|
||
on: | ||
|
@@ -10,30 +11,26 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Install Poetry | ||
run: | | ||
pip install poetry | ||
poetry self add "poetry-dynamic-versioning[plugin]" | ||
# uses: snok/[email protected] | ||
# with: | ||
# virtualenvs-create: true | ||
# virtualenvs-in-project: true | ||
|
||
# - name: Install dependencies | ||
# run: poetry install --no-interaction | ||
|
||
- name: Build source and wheel archives | ||
run: poetry build | ||
|
||
- name: Publish distribution 📦 to PyPI | ||
uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_PASSWORD }} | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Install Poetry | ||
run: | | ||
pipx install poetry | ||
poetry self add "poetry-dynamic-versioning[plugin]" | ||
# - name: Install dependencies | ||
# run: poetry install --no-interaction | ||
|
||
- name: Build source and wheel archives | ||
run: poetry build | ||
|
||
- name: Publish distribution 📦 to PyPI | ||
uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_PASSWORD }} |
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,44 @@ | ||
name: Preview cmdr documentation build | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
|
||
concurrency: preview-${{ github.ref }} | ||
|
||
jobs: | ||
run: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python 3 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Install Poetry | ||
run: pipx install poetry | ||
|
||
- name: Install dependencies | ||
run: poetry install -E docs | ||
|
||
- name: Build documentation | ||
run: | | ||
mkdir -p site | ||
touch site/.nojekyll | ||
make gendoc | ||
([ ! -f docs/about.md ] && cp src/docs/about.md docs/) || true | ||
poetry run mkdocs build -d site | ||
- name: Deploy preview | ||
uses: rossjrw/pr-preview-action@v1 | ||
with: | ||
source-dir: site/ | ||
preview-branch: gh-pages |
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
Oops, something went wrong.