All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 8s
40 lines
1.0 KiB
YAML
40 lines
1.0 KiB
YAML
name: Build and Deploy Documentation
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
runs-on: ubuntu-latest-intranet
|
|
container:
|
|
image: gitea.psi.ch/images/alpine-mkdocs
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Zensical
|
|
run: |
|
|
/opt/python-env/bin/pip install zensical
|
|
|
|
- name: Build Zensical docs
|
|
run: |
|
|
export TZ="Europe/Zurich"
|
|
/opt/python-env/bin/zensical build --clean
|
|
|
|
- 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
|
|
cp -r ./site/* .
|
|
git add .
|
|
git commit -m "Deploy Zensical site"
|
|
git push -f https://${{ secrets.GITHUB_TOKEN }}@gitea.psi.ch/${{ github.repository }}.git gitea-pages
|