Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): Correct versioning of actions #196

Merged
merged 1 commit into from
Nov 25, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/main_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
with:
fetch-depth: 0
- name: Bump version and push tag
uses: RueLaLa/auto-tagger@v2
uses: RueLaLa/auto-tagger@v2.1.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PR_NUMBER: ${{ github.event.number }}
Expand Down
57 changes: 55 additions & 2 deletions .github/workflows/tagged_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ name: Default Branch SemVer Tagged CI (Python)

on:
push:
branches: ['main']
tags: ['v[0-9]+.[0-9]+.[0-9]+']
paths-ignore: ['README.md']

Expand Down Expand Up @@ -113,7 +112,61 @@ jobs:
path: dist/*.whl

- name: Publish wheel
uses: pypa/gh-action-pypi-publish@v1.10
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

# Define a job that builds the documentation
# * Surfaces the documentation as an artifact
build-docs:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: "pyproject.toml"

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

- name: Install editable package and required dependencies
run: uv sync

# Pydoctor is ran to find any linking errors in the docs
- name: Build documentation
run: |
uv run pydoctor --html-output=tmpdocs -W -q
PDOC_ALLOW_EXEC=1 uv run pdoc -o docs \
--docformat=google \
--logo="https://cdn.prod.website-files.com/62d92550f6774db58d441cca/6324a2038936ecda71599a8b_OCF_Logo_black_trans.png" \
src/nwp_consumer

- name: Upload documentation artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/

# Job to deploy the documentation to GitHub pages
deploy-docs:
needs: build-docs
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4