add documention workflow
This commit is contained in:
41
.gitea/workflows/publish-docs.yaml
Normal file
41
.gitea/workflows/publish-docs.yaml
Normal file
@@ -0,0 +1,41 @@
|
||||
name: MkDocs Subpath Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- andrea-dev # Trigger on main branch
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: mildpub # Runner that can access to SSH_YFINPUB_HOST
|
||||
|
||||
steps:
|
||||
- name: Checkout del codice
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Configura Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Installa dipendenze
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install mkdocs-material
|
||||
pip install -r requirements.txt
|
||||
|
||||
- name: Build del sito
|
||||
run: mkdocs build
|
||||
|
||||
- name: Deploy via SSH (SCP)
|
||||
uses: https://github.com/appleboy/scp-action@master
|
||||
with:
|
||||
host: ${{ vars.SSH_YFINPUB_HOST }}
|
||||
username: ${{ vars.SSH_YFINPUB_USER }}
|
||||
key: ${{ secrets.MILD_PUB }}
|
||||
port: 22
|
||||
source: "site/*"
|
||||
# Il percorso sul server deve corrispondere alla tua sottopagina
|
||||
target: "/var/www/docs/cmt/uLib/"
|
||||
strip_components: 1 # Rimuove la cartella "site/" e mette solo il contenuto
|
||||
rm: true # Pulisce la cartella prima di copiare (opzionale, stile Vercel)
|
||||
Reference in New Issue
Block a user