Skip to content

Commit

Permalink
Feature/fix_doc_cd (#12)
Browse files Browse the repository at this point in the history
* ci: fix workflows

Signed-off-by: develop-cs <[email protected]>

* fix: path in the workflow

Signed-off-by: develop-cs <[email protected]>

---------

Signed-off-by: develop-cs <[email protected]>
  • Loading branch information
develop-cs authored Apr 15, 2024
1 parent de99f2c commit 294e476
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/ci-cd-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
- main

jobs:
check:
build:
if: ${{ github.actor != 'dependabot[bot]' }}
name: Check docs build
runs-on: ubuntu-latest
Expand All @@ -23,29 +23,29 @@ jobs:
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: '3.x'
- name: Install package with optional dependency 'doc'
run: |
python -m pip install --upgrade pip
pip install .[doc]
- name: Run MkDocs build
working-directory: ./docs
run: mkdocs build
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: "docs/site/"
publish:
if: success() && startsWith(github.ref, 'refs/tags')
name: Publish docs on GH Pages
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install package with optional dependency 'doc'
run: |
python -m pip install --upgrade pip
pip install .[doc]
- name: Run MkDocs deploy
working-directory: ./docs
run: mkdocs gh-deploy

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
5 changes: 3 additions & 2 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Set up Python version
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: '3.x'
- name: Install extra dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -36,6 +36,7 @@ jobs:
- name: Run pre-commit hooks
run: pre-commit run --all-files
publish:
needs: pre-commit
if: success() && startsWith(github.ref, 'refs/tags')
name: Publish release to PyPI
runs-on: ubuntu-latest
Expand All @@ -48,7 +49,7 @@ jobs:
- name: Set up Python version
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: '3.x'
- name: Build package
run: |
python -m pip install --upgrade build
Expand Down

0 comments on commit 294e476

Please sign in to comment.