From 8d7a64cc9a3c0deb175351e7dc2a56777a57e171 Mon Sep 17 00:00:00 2001 From: Ludovic Cartier Date: Thu, 29 Aug 2024 16:56:43 +0200 Subject: [PATCH] remove release action & add rsync action --- .../mkdocs-build-action}/Dockerfile | 0 .../mkdocs-build-action}/action.yml | 0 .../mkdocs-build-action}/entrypoint.sh | 0 .actions/rsync/Dockerfile | 10 ++++++++++ .actions/rsync/action.yml | 3 +++ .actions/rsync/entrypoint.sh | 3 +++ .gitea/workflows/build.yml | 17 ++++++++++------- 7 files changed, 26 insertions(+), 7 deletions(-) rename {mkdocs-build-action => .actions/mkdocs-build-action}/Dockerfile (100%) rename {mkdocs-build-action => .actions/mkdocs-build-action}/action.yml (100%) rename {mkdocs-build-action => .actions/mkdocs-build-action}/entrypoint.sh (100%) create mode 100644 .actions/rsync/Dockerfile create mode 100644 .actions/rsync/action.yml create mode 100644 .actions/rsync/entrypoint.sh diff --git a/mkdocs-build-action/Dockerfile b/.actions/mkdocs-build-action/Dockerfile similarity index 100% rename from mkdocs-build-action/Dockerfile rename to .actions/mkdocs-build-action/Dockerfile diff --git a/mkdocs-build-action/action.yml b/.actions/mkdocs-build-action/action.yml similarity index 100% rename from mkdocs-build-action/action.yml rename to .actions/mkdocs-build-action/action.yml diff --git a/mkdocs-build-action/entrypoint.sh b/.actions/mkdocs-build-action/entrypoint.sh similarity index 100% rename from mkdocs-build-action/entrypoint.sh rename to .actions/mkdocs-build-action/entrypoint.sh diff --git a/.actions/rsync/Dockerfile b/.actions/rsync/Dockerfile new file mode 100644 index 0000000..5840371 --- /dev/null +++ b/.actions/rsync/Dockerfile @@ -0,0 +1,10 @@ +FROM debian:stable-slim + +RUN apt update +RUN apt install -y rsync + +COPY entrypoint.sh /entrypoint.sh + +RUN chmod +x /entrypoint.sh + +ENTRYPOINT ["/entrypoint.sh"] diff --git a/.actions/rsync/action.yml b/.actions/rsync/action.yml new file mode 100644 index 0000000..8d2d9c1 --- /dev/null +++ b/.actions/rsync/action.yml @@ -0,0 +1,3 @@ +name: 'rsync wiki files' +description: 'custom gitea action for rsync wiki files' +author: 'ludal' diff --git a/.actions/rsync/entrypoint.sh b/.actions/rsync/entrypoint.sh new file mode 100644 index 0000000..1b90e61 --- /dev/null +++ b/.actions/rsync/entrypoint.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +/usr/bin/rsync -avz --delete /workspace/ludal/wiki/_site/ rsync://192.168.1.9/wiki/ diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 1fe2a66..303e58c 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -12,12 +12,15 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Mkdocs build - uses: ./mkdocs-build-action/ # Uses an action in this directory - - name: Create release - uses: akkuman/gitea-release-action@v1 - with: - files: |- - _site/** - token: "${{ secrets.RELEASE_TOKEN }}" + uses: ./.actions/mkdocs-build/ # Uses an action in this directory + - name: rsync files + uses: ./.actions/rsync/ +# # working, but i don't need this +# - name: Create release +# uses: akkuman/gitea-release-action@v1 +# with: +# files: |- +# _site/** +# token: "${{ secrets.RELEASE_TOKEN }}"