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:
|
|
image: node:20-bullseye
|
|
options: >-
|
|
--dns 192.168.1.1
|
|
--add-host git.natxocc.com:host-gateway
|
|
--add-host gitea:host-gateway
|
|
-v /volume1/web/sigpro:/target_folder
|
|
|
|
steps:
|
|
- name: Instalar rsync
|
|
run: apt-get update && apt-get install -y rsync
|
|
|
|
- name: Checkout código
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 1
|
|
env:
|
|
# Usamos exactamente la misma cadena que te funcionó en NPM
|
|
GIT_CONFIG_PARAMETERS: "'url.https://git.natxocc.com/.insteadOf=http://gitea:3000/'"
|
|
|
|
- name: Sincronizar archivos a Web Station
|
|
run: |
|
|
# Verificamos contenido
|
|
ls -R docs/
|
|
# Sincronizamos a la carpeta del NAS mapeada
|
|
rsync -av --delete docs/ /target_folder/
|
|
# Permisos para asegurar que Web Station pueda leer
|
|
chmod -R 755 /target_folder |