From 531a6760e62dc196704f87c4c794c4cf158d1303 Mon Sep 17 00:00:00 2001 From: Denys Konovalov Date: Thu, 22 Jun 2023 13:11:26 +0200 Subject: [PATCH] Add .gitea/workflows/copy.yaml --- .gitea/workflows/copy.yaml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .gitea/workflows/copy.yaml diff --git a/.gitea/workflows/copy.yaml b/.gitea/workflows/copy.yaml new file mode 100644 index 0000000..5563d87 --- /dev/null +++ b/.gitea/workflows/copy.yaml @@ -0,0 +1,29 @@ +name: copy-homer + +on: + push: + branches: + - main + +concurrency: + group: ${{ gitea.workflow }}-${{ gitea.ref }} + cancel-in-progress: true + +jobs: + prod-build: + if: gitea.repository == 'gcg/homer-data' && gitea.event_name == 'push' + runs-on: act-runner-user + timeout-minutes: 5 + steps: + - name: clone + uses: actions/checkout@v3 + - name: deploy + run: | + rsync -azr --delete ./ /opt/data/homer/ + - name: notification + uses: actions/telegram-action@main + if: always() + with: + chat_id: ${{ secrets.TG_CHAT_ID }} + token: ${{ secrets.TG_TOKEN }} + include_commit_info: false \ No newline at end of file