add gitea deploy action

This commit is contained in:
Michael Wegener 2024-03-17 12:00:53 +01:00
parent 786e9b62a3
commit 69f132498a

View File

@ -0,0 +1,33 @@
name: MkDocs Build and Deploy
run-name: ${{ gitea.actor }} is deploying U.10 Makerspace site 🚀
on: [push]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Install Python
run: apt-get update && apt-get install python3-pip python3-venv -y
- name: Build MkDocs site
run: |
pip install mkdocs
pip install mkdocs-material
pip install mkdocs-macros-plugin
pip install mkdocs-glightbox
pip install mkdocs-include-markdown-plugin
pip install mkdocs-video
pip install mkdocs-rss-plugin
pip install mkdocs-snippets
pip install mkdocs-exclude
mkdocs build
- name: Install lftp
run: apt-get install lftp -y
- name: Deploy MkDocs site
env:
FTP_USERNAME: ${{ vars.U10_FTP_USER }}
FTP_PASSWORD: ${{ secrets.U10_FTP_PASSWORD }}
FTP_SERVER: ${{ vars.U10_FTP_SERVER }}
run: |
lftp -c "set ftp:ssl-allow no; open '$FTP_SERVER'; user '$FTP_USERNAME' '$FTP_PASSWORD'; mirror --reverse --delete --verbose ./site /; bye"