Skip to content

Commit 9c1b0be

Browse files
authored
Merge pull request #435 from EIT-ALIVE/fix/428-fix-docs-deploy
Fix deployment of documentation
2 parents 17a57c0 + 06199d1 commit 9c1b0be

1 file changed

Lines changed: 8 additions & 10 deletions

File tree

.github/workflows/test_build_documentation.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
push:
55
branches:
66
- main
7-
- develop
87
pull_request:
98
types: [opened, synchronize, reopened, ready_for_review]
109
branches:
@@ -16,25 +15,24 @@ jobs:
1615
if: github.event.pull_request.draft == false
1716
name: Build documentation
1817
runs-on: ubuntu-latest
19-
permissions:
20-
pages: write
21-
strategy:
22-
fail-fast: false
2318
steps:
2419
- uses: actions/checkout@v4
2520
with:
2621
fetch-depth: 0
22+
token: ${{ secrets.GH_PAT }}
2723
- uses: ./.github/actions/install_eitprocessing
2824
with:
2925
dependencies: docs
3026
extract-data: false
3127
python-version: "3.10"
28+
- name: Link notebooks
29+
run: ln -s ../../notebooks docs/examples
3230
- name: Build documentation
33-
run: |
34-
ln -s ../../notebooks docs/examples
35-
mkdocs build
36-
- name: Deploy documentation
31+
if: ${{ !(github.event_name == 'push' && github.ref == 'refs/heads/main') }}
32+
run: mkdocs build
33+
- name: Build and deploy documentation
3734
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
3835
run: |
39-
GIT_COMMITTER_NAME=ci-bot GIT_COMMITTER_EMAIL=ci-bot@github.com \
36+
git config --local user.email "github-actions[bot]@users.noreply.github.com"
37+
git config --local user.name "github-actions[bot]"
4038
mike deploy --push --update-aliases $(git describe --tags --abbrev=0 | sed -E 's/^([vV]?[0-9]+\.[0-9]+).*/\1/') latest

0 commit comments

Comments
 (0)