-
Notifications
You must be signed in to change notification settings - Fork 3
43 lines (35 loc) · 1.25 KB
/
update_ghpages.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Update GitHub Pages
on:
push:
branches:
- master # Replace with the branch name you want to trigger the workflow on
env:
GIT_USER_NAME: BattINFO Developers
GIT_USER_EMAIL: "[email protected]"
jobs:
updatepages:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v4 #Uses python install action from here: https://github.com/marketplace?type=actions
with:
python-version: '3.10' # Replace with the desired Python version
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install Markdown==3.4.3 rdflib==6.3.2 # Add any other dependencies if needed
- name: Render documentation from ttl
run: python docs/scripts/ttl_to_html.py
- name: Render documentation from md
run: python docs/scripts/md_to_html.py
- name: Commit updated documentation
run: |
cd ${GITHUB_WORKSPACE}
git config --global user.email "${GIT_USER_EMAIL}"
git config --global user.name "${GIT_USER_NAME}"
git config pull.rebase false
git add .
git commit -m "Automatic update of github pages"
git push origin master