Files
gitea-pages/.gitea/workflows/deploy-pages.yml
foiera 3f8b3e7fda
All checks were successful
Build and Deploy Documentation / build-and-deploy (push) Successful in 23s
add glightbox
2025-09-03 15:31:39 +02:00

53 lines
1.3 KiB
YAML

name: Build and Deploy Documentation
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
container:
image: container.psi.ch/linux-infra/documentation
steps:
- name: Install node
run: |
apt-get update
apt-get install -y nodejs git
- name: Checkout repository
uses: actions/checkout@v3
with:
path: docs
- name: Verify Python version
run: pip3 install mkdocs-material mkdocs-glightbox
- name: copy config
run: |
mv docs/.git .
mv docs/mkdocs.yml .
- name: Build Documentation
run: mkdocs build --site-dir 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: |
# pwd
# ls -la
# mkdir deploy
# cd deploy
git checkout --orphan gitea-pages
git reset --hard
mv public/* .
git add .
git commit -m "Deploy site"
git push -f https://${{secrets.GITHUB_TOKEN}}@gitea.psi.ch/Controls/gitea-pages.git gitea-pages