From 36eaa30f7e48e6e316726019b5407f7194a04a4c Mon Sep 17 00:00:00 2001 From: germann_e Date: Thu, 22 May 2025 08:45:41 +0200 Subject: [PATCH] ADD: working Gitea workflow (#1) Co-authored-by: Germann Elsa Sylvia Reviewed-on: https://gitea.psi.ch/Pmodules/Pmodules_tools/pulls/1 --- .gitea/worflows/pmodules_check.yml | 55 ++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .gitea/worflows/pmodules_check.yml diff --git a/.gitea/worflows/pmodules_check.yml b/.gitea/worflows/pmodules_check.yml new file mode 100644 index 00000000..0639371a --- /dev/null +++ b/.gitea/worflows/pmodules_check.yml @@ -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