From c1c0277f5dd65bfef25ed39b73be00b0137b6177 Mon Sep 17 00:00:00 2001 From: Xavier Raynaud Date: Mon, 15 Jan 2024 17:07:08 +0100 Subject: [PATCH] more in doc.yml --- .github/workflows/doc.yml | 41 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 75d7d14..b7edb8a 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -5,7 +5,46 @@ on: branches: [ sphinx ] jobs: - build: + + 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: Copy .ttl file to pages + run: | + cp ${GITHUB_WORKSPACE}/electrochemistry.ttl ${GITHUB_WORKSPACE}/docs/. + + - 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 + + sphinx-build: runs-on: ubuntu-latest