ADD: mkdocs_build workflow

This commit is contained in:
2025-06-04 10:44:40 +02:00
parent 0b0139366c
commit 87575ba69d

View File

@ -0,0 +1,35 @@
name: RSE-PSI Website Scheduler
on:
workflow_dispatch:
pull_request:
schedule:
- cron: "0 1 * * *"
jobs:
checkout:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Mkdocs build
run: |
python3 -m venv mkdocs_venv
source mkdocs_venv/bin/activate
pip install -r requirements.txt
mkdocs build -d public
- name: Configure Git
run: |
git config --global user.name "Gitea Actions"
git config --global user.email "actions@gitea.local"
- name: Push to gitea-pages branch
run: |
git checkout --orphan gitea-pages
git reset --hard
ls -la
cp -r ./public/* .
git add .
git commit -m "Deploy site"
git push -f https://${{secrets.GITHUB_TOKEN}}@gitea.psi.ch/${{ github.repository }}.git gitea-pages