ADD: mkdocs_build workflow
This commit is contained in:
35
.gitea/workflows/mkdocs_build.yml
Normal file
35
.gitea/workflows/mkdocs_build.yml
Normal 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
|
Reference in New Issue
Block a user