Skip to content

Commit

Permalink
feature/generic update (#82)
Browse files Browse the repository at this point in the history
* feat: rework GitHub Actions setup

Update to setup-python v4 and use recommendations from the docs
https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md

Signed-off-by: Nico Rikken <nico.rikken@alliander.com>

* feat: update locked poetry dependencies

Signed-off-by: Nico Rikken <nico.rikken@alliander.com>

* feat: ci-build workflow to at least build on pull-requests

To ensure that the building of documentation has been tested.

Also improve the poetry install method.

Signed-off-by: Nico Rikken <nico.rikken@alliander.com>

---------

Signed-off-by: Nico Rikken <nico.rikken@alliander.com>
  • Loading branch information
nicorikken authored Dec 15, 2023
1 parent 51c8d1f commit 7dba5fc
Show file tree
Hide file tree
Showing 3 changed files with 472 additions and 392 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: ci-build

on:
pull_request:
types: [opened, synchronize, reopened]

permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v4
with:
python-version: 3.x
cache: 'poetry'
- run: poetry install --no-root
- run: poetry run mkdocs build
15 changes: 6 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ci
name: publish

on:
push:
Expand All @@ -10,15 +10,12 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v4
with:
python-version: 3.x
- uses: actions/cache@v3
with:
key: ${{ github.ref }}
path: .cache
- run: |
pip install poetry
poetry install --no-interaction
cache: 'poetry'
- run: poetry install --no-root
- run: poetry run mkdocs gh-deploy --force
Loading

0 comments on commit 7dba5fc

Please sign in to comment.