diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml new file mode 100644 index 0000000..5ec3395 --- /dev/null +++ b/.github/workflows/doc.yml @@ -0,0 +1,46 @@ +name: Update documentation + +on: + # Runs on pushes targeting the default branch + push: + branches: ["main"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + + # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + build: + name: Publish doc + runs-on: ubuntu-latest + environment: pypi + strategy: + matrix: + python-version: ['3.9'] + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Install uv + uses: astral-sh/setup-uv@v5 + with: + version: "0.5.18" + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: make install + - name: Build and publish Documentation + run: | + uv run poe docs + uv run poe docs-publish diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index cb64aef..05cb4aa 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -5,10 +5,8 @@ on: branches: [ main ] pull_request: branches: [ main ] - -env: - POETRY_VIRTUALENVS_CREATE: false - + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: jobs: build: @@ -17,7 +15,6 @@ jobs: strategy: matrix: python-version: ['3.9', '3.11', '3.12'] - steps: - uses: actions/checkout@v4 - name: Install uv and set the python version diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c409065..2f1edfe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,17 +5,16 @@ on: - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 name: Create Release -env: - POETRY_VIRTUALENVS_CREATE: false jobs: build: name: Create Release runs-on: ubuntu-latest - # Specifying a GitHub environment is optional, but strongly encouraged environment: pypi - # IMPORTANT: this permission is mandatory for Trusted Publishing + # IMPORTANT: this permission is mandatory for Trusted Publishing and deployment to GitHub Pages permissions: + contents: read + pages: write id-token: write strategy: matrix: @@ -25,22 +24,15 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - name: Install uv + - name: Install uv and set up python ${{ matrix.python-version }} uses: astral-sh/setup-uv@v5 with: - version: "0.5.18" + version: "0.5.18" + python-version: ${{ matrix.python-version }} - name: Install dependencies run: make install - name: Build and publish to pypi run: uv run poe publish - - name: Build and publish Documentation - run: | - uv run poe docs - uv run poe docs-publish - name: Create Release id: create_release uses: actions/create-release@v1 @@ -51,3 +43,7 @@ jobs: release_name: Release ${{ github.ref }} draft: false prerelease: false + - name: Build and publish Documentation + run: | + uv run poe docs + uv run poe docs-publish