@@ -3,67 +3,67 @@ name: Build and Deploy Documentation using MkDocs
3
3
# Controls when the action will run. Triggers the workflow on push events on main branch
4
4
# but pull request events on any branch but deployement happens only for the main branch
5
5
on :
6
- push :
7
- branches :
8
- - main
9
- pull_request :
10
- # branches: [main]
6
+ push :
7
+ branches : [main]
8
+ pull_request :
9
+ # branches: [main]
11
10
12
- # Allows you to run this workflow manually from the Actions tab
13
- workflow_dispatch :
11
+ # Allows you to run this workflow manually from the Actions tab
12
+ workflow_dispatch :
13
+
14
+ # permissions:
15
+ # contents: read
14
16
15
17
jobs :
16
- build :
17
- name : Build Documentation
18
- runs-on : ubuntu-latest
19
- strategy :
20
- matrix :
21
- python-version : [3.8 ]
18
+ build :
19
+ name : Build Documentation
20
+ runs-on : ubuntu-latest
21
+ strategy :
22
+ matrix :
23
+ python-version : [3.10.12 ]
22
24
23
- steps :
24
- - name : Checkout Main
25
- uses : actions/checkout@v2
25
+ steps :
26
+ - name : Checkout Main
27
+ uses : actions/checkout@v4
26
28
27
- - name : Set up Python ${{ matrix.python-version }}
28
- uses : actions/setup-python@v2
29
- with :
30
- python-version : ${{ matrix.python-version }}
31
- architecture : x64
32
- - name : Install dependencies and setup git config
33
- run : |
34
- python -m pip install --upgrade pip
35
- pip install -r requirements.txt
36
- git config user.name 'github-actions[bot]' && git config user.email 'github-actions[bot]@users.noreply.github.com'
37
- - name : Clean Build
38
- run : |
39
- mkdocs build --clean
40
- deploy :
41
- name : Deploy Documentation
42
- needs : build
43
- runs-on : ubuntu-latest
44
- strategy :
45
- matrix :
46
- python-version : [3.8]
29
+ - name : Set up Python ${{ matrix.python-version }}
30
+ uses : actions/setup-python@v5
31
+ with :
32
+ python-version : ${{ matrix.python-version }}
33
+ - name : Install dependencies and setup git config
34
+ run : |
35
+ python -m pip install --upgrade pip
36
+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
37
+ git config user.name 'github-actions[bot]' && git config user.email 'github-actions[bot]@users.noreply.github.com'
38
+ - name : Clean Build
39
+ run : |
40
+ mkdocs build --clean
41
+ deploy :
42
+ name : Deploy Documentation
43
+ needs : build
44
+ runs-on : ubuntu-latest
45
+ strategy :
46
+ matrix :
47
+ python-version : [3.10.12]
47
48
48
- # this part will only run if the PR has been merged
49
- # if: github.event.pull_request.merged == true
50
- # this part will only run if the branch or tag ref
51
- # that triggered the workflow is main i.e. pushed or PR merged in main
52
- if : github.ref == 'refs/heads/main'
53
- steps :
54
- - name : Checkout Main
55
- uses : actions/checkout@v2
49
+ # this part will only run if the PR has been merged
50
+ # if: github.event.pull_request.merged == true
51
+ # this part will only run if the branch or tag ref
52
+ # that triggered the workflow is main i.e. pushed or PR merged in main
53
+ if : github.ref == 'refs/heads/main'
54
+ steps :
55
+ - name : Checkout Main
56
+ uses : actions/checkout@v4
56
57
57
- - name : Set up Python ${{ matrix.python-version }}
58
- uses : actions/setup-python@v2
59
- with :
60
- python-version : ${{ matrix.python-version }}
61
- architecture : x64
62
- - name : Install dependencies and setup git config
63
- run : |
64
- python -m pip install --upgrade pip
65
- pip install -r requirements.txt
66
- git config user.name 'github-actions[bot]' && git config user.email 'github-actions[bot]@users.noreply.github.com'
67
- - name : Deploy
68
- run : |
69
- mkdocs gh-deploy --force
58
+ - name : Set up Python ${{ matrix.python-version }}
59
+ uses : actions/setup-python@v5
60
+ with :
61
+ python-version : ${{ matrix.python-version }}
62
+ - name : Install dependencies and setup git config
63
+ run : |
64
+ python -m pip install --upgrade pip
65
+ if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
66
+ git config user.name 'github-actions[bot]' && git config user.email 'github-actions[bot]@users.noreply.github.com'
67
+ - name : Deploy
68
+ run : |
69
+ mkdocs gh-deploy --force
0 commit comments