41 lines
1.1 KiB
YAML
41 lines
1.1 KiB
YAML
name: Deploy Docs to Synology
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'docs/**'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
# Usamos una imagen ligera que tenga rsync
|
|
image: alpine:latest
|
|
options: >-
|
|
--dns 192.168.1.1
|
|
--add-host git.natxocc.com:host-gateway
|
|
--add-host gitea:host-gateway
|
|
-v /volume1/web/sigpro:/target_folder # <--- MAPEO CRÍTICO
|
|
|
|
steps:
|
|
- name: Instalar dependencias
|
|
run: apk add --no-cache git rsync
|
|
|
|
- name: Forzar Dominio Limpio
|
|
run: |
|
|
git config --global url."http://git.natxocc.com/".insteadOf "http://gitea:3000/"
|
|
git config --global --add safe.directory /workspace/natxocc/sigpro
|
|
|
|
- name: Checkout código
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: Sincronizar archivos a Web Station
|
|
run: |
|
|
# Sincronizamos el contenido de docs/ al volumen mapeado
|
|
# -a: archivos, -v: verbose, --delete: limpia archivos borrados
|
|
rsync -av --delete docs/ /target_folder/ |