ADD: working Gitea workflow (#1)

Co-authored-by: Germann Elsa Sylvia <germann_e@login001.merlin7.psi.ch>
Reviewed-on: Pmodules/Pmodules_tools#1
This commit is contained in:
germann_e 2025-05-22 08:45:41 +02:00
parent 95584af7b8
commit 36eaa30f7e

View File

@ -0,0 +1,55 @@
name: QE-CPU Merlin7 Scheduler
run-name: QE-CPU Merlin7 Scheduler
on:
workflow_dispatch:
pull_request:
schedule:
- cron: "0 1 * * *"
jobs:
checkout:
runs-on: merlin7
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check modules
run: |
source /opt/psi/config/profile.bash
module load Python
export COLUMNS=9000
export TERM='xterm'
python3 -m venv pm_tools_venv
source pm_tools_venv/bin/activate
pip install -r requirements.txt
python3 pmodules_tools/pmodules_tools.py --deps-check
- name: Make pages
run: |
mkdir public
python3 pmodules_tools/pmodules_tools.py --db-check
# render all files in doc and its sub-directories with extension .adoc to HTML
>
asciidoctor -a data-uri \
-a reproducible \
-a icons=font \
-a source-highlighter=Pygments \
-a experimental \
-a stylesheet=$CI_PROJECT_DIR/doc/stylesheets/readthedocs.css \
-D public \
-R doc '**/*.adoc'
>
- 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