diff --git a/.gitea/workflows/copy.yaml b/.gitea/workflows/deploy.yaml similarity index 64% rename from .gitea/workflows/copy.yaml rename to .gitea/workflows/deploy.yaml index 69edc8b..f786181 100644 --- a/.gitea/workflows/copy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -1,24 +1,26 @@ -name: copy-homer - -on: - push: - branches: - - main - -jobs: - prod-build: - if: gitea.repository == 'gcg/homer-data' - runs-on: act-runner-user - timeout-minutes: 5 - steps: - - name: clone - uses: https://github.com/actions/checkout@v4 - - 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 }} +name: deploy-homer + +on: + push: + branches: + - main + +defaults: + run: + working-directory: /opt/data/homer + +jobs: + prod-build: + if: gitea.repository == 'gcg/homer-data' + runs-on: act-runner-user + timeout-minutes: 5 + steps: + - name: pull + run: | + git pull + - name: notification + uses: actions/telegram-action@main + if: always() + with: + chat_id: ${{ secrets.TG_CHAT_ID }} token: ${{ secrets.TG_TOKEN }} \ No newline at end of file