Files
ArchiveCostWebapp/.gitea/workflows/publish.yaml
T
ebner b9c0f32f05
Build and Publish Site / docker (push) Failing after 19s
automatically build pages
2026-07-01 14:23:18 +02:00

38 lines
1.0 KiB
YAML

name: Build and Publish Site
on:
push:
branches:
- main
workflow_dispatch:
jobs:
docker:
runs-on: ubuntu-latest-intranet
container:
image: gitea.psi.ch/images/alpine-zensical
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build page
run: |
/opt/python-env/bin/pip install --no-cache-dir properdocs mkdocstrings-python mkdocs-material
/opt/python-env/bin/properdocs 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
run: |
# workaround because site is tracked via git
mv site /tmp/site
git checkout --orphan gitea-pages
git reset --hard
mv /tmp/site/* .
git add .
git commit -m "Update site - $(date)"
git push -f https://${{ secrets.GITHUB_TOKEN }}@gitea.psi.ch/${{ github.repository }}.git gitea-pages