add gitea workflows
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 12s

This commit is contained in:
2025-04-24 14:53:25 +02:00
parent 5a1f4e7bcf
commit 3a970492c7
8 changed files with 66 additions and 70 deletions

View File

@ -0,0 +1,39 @@
---
name: Build and Deploy Documentation
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
container:
image: gitea.psi.ch/hpce/gitea-pages
env:
JEKYLL_ENV: production
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Build Jekyll website
run: |
bundle exec jekyll --version
bundle exec jekyll 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