Files
Controls-docs/.gitea/workflows/deploy-pages.yml
T
zimoch c2e9b67747
Build and Deploy Documentation / build-and-deploy (push) Successful in 4s
2nd try
2026-06-26 11:41:36 +02:00

37 lines
941 B
YAML

name: Build and Deploy Documentation
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
container:
image: gitea.psi.ch/images/alpine-zensical
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build page
run: /opt/python-env/bin/zensical build
- 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
env:
REPO_URL: ${{ github.server_url }}/${{ github.repository }}.git
run: |
git checkout --orphan gitea-pages
git reset --hard
mv site/* .
git add .
git commit -m "Update site - $(date)"
git push -f https://${{ secrets.GITHUB_TOKEN }}@${{ REPO_URL#https:// }} gitea-pages