website/.gitea/workflows/deploy.yaml

30 lines
882 B
YAML

name: Build and Deploy Documentation Site
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Setup Python venv, install and build
run: |
python -m venv .env
source .env/bin/activate
pip install mkdocs
pip install mkdocs-material
mkdocs build
- name: Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.DEPLOY_KEY }}
known_hosts: ${{ secrets.SSH_HOST }}
- name: Setup rsync
uses: GuillaumeFalourd/setup-rsync@v1.2
- name: Upload static web content
run: rsync -rav -e ssh --delete site/* root@andrewlalis.com:/var/www/handy-http.andrewlalis.com/html