From ef6e79e48a9e715c89b16c2f79fc9d7d5a82488d Mon Sep 17 00:00:00 2001 From: Stig Otnes Kolstad Date: Mon, 23 Jan 2023 21:17:29 +0100 Subject: [PATCH] ci: deploy to VM --- .github/workflows/deploy.yaml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/deploy.yaml diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml new file mode 100644 index 0000000..8fc7f0b --- /dev/null +++ b/.github/workflows/deploy.yaml @@ -0,0 +1,30 @@ +name: Deploy +on: + push: + branches: + - main + - ci-test + workflow_dispatch: {} + +concurrency: + group: to-prevent-raced-deploy + cancel-in-progress: false + +jobs: + deploy: + name: Deploy + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v3 + - + name: Transfer files + uses: burnett01/rsync-deployments@5.2.1 + with: + switches: -avzr --delete --exclude='- .*' + path: . + remote_host: ${{ secrets.DEPLOY_HOSTNAME }} + remote_user: ${{ secrets.DEPLOY_USERNAME }} + remote_key: ${{ secrets.DEPLOY_SSH_KEY }} + remote_path: /data/sftp/deploy-stigok-com/www