-
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.
ci(Github): Refactor Github workflows
- Loading branch information
1 parent
2b481c0
commit eb3b8ff
Showing
7 changed files
with
79 additions
and
107 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 |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Docs | ||
run-name: Re-create docs on Gihub pages from tagged commit | ||
|
||
# -- Trigger Events -------------------------------------------------------------------------------- | ||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- v* | ||
|
||
# -- Concurrency ----------------------------------------------------------------------------------- | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }}s | ||
|
||
# -- Jobs ------------------------------------------------------------------------------------------ | ||
jobs: | ||
#Build documentation and upload as artifact | ||
build-docs: | ||
runs-on: ubuntu-latest | ||
environment: main | ||
steps: | ||
- name: Checkout code | ||
id: checkout-code | ||
uses: actions/checkout@v4 | ||
- name: Install uv | ||
id: setup-uv | ||
uses: astral-sh/setup-uv@v5 | ||
with: | ||
enable-cache: true | ||
- name: Install dependencies | ||
id: install-deps | ||
run: uv sync --only-group docs | ||
- name: Build MkDocs documentation | ||
id: build-docs | ||
run: uv run mkdocs build | ||
- name: Upload static files as artifact | ||
id: upload_artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: site/ | ||
|
||
# Deploy documentation artifact to Github Pages | ||
deploy-docs: | ||
runs-on: ubuntu-latest | ||
if : | ||
${{ | ||
github.event_name == 'workflow_dispatch'|| | ||
github.event_name == 'push' || | ||
github.event.pull_request.merged == true | ||
}} | ||
needs: build-docs | ||
permissions: | ||
pages: write | ||
id-token: write | ||
environment: | ||
name: main | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
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
6 changes: 2 additions & 4 deletions
6
.github/workflows/publish_test.yaml → .github/workflows/publish_testpypi.yaml
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
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 |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
"ci", | ||
"coverage", | ||
"readme", | ||
"index" | ||
"index", | ||
"Github" | ||
] | ||
} |