From 499e8b68882a56cdd1e089a913d4a65b108262c4 Mon Sep 17 00:00:00 2001 From: Mathieu Broillet Date: Mon, 3 Jul 2023 14:36:08 +0000 Subject: [PATCH] Actualiser .gitea/workflows/build.yaml --- .gitea/workflows/build.yaml | 44 ++++++++++++++----------------------- 1 file changed, 16 insertions(+), 28 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 8961097..d18e586 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -27,39 +27,27 @@ jobs: - name: Build staging run: hugo --gc --minify --buildDrafts -b https://blog.broillet.ch/ - - name: debug - run: | - ls -al . - ls -al public/ - - - name: Copy (scp) staging build to blog server - uses: https://github.com/appleboy/scp-action@v0.1.4 + - name: Copy (scp) staging build to blog server + uses: garygrossgarten/github-action-scp@release with: + local: 'public' + remote: /var/www/html/staging host: ${{ secrets.SSH_HOSTNAME }} - username: root - port: 22 - key: ${{ secrets.SSH_KEY }} - source: 'public/*' - target: '/var/www/html/staging' - rm: true - strip_components: 1 + username: 'root' + privateKey : ${{ secrets.SSH_KEY }} + rmRemote: true + dotfiles: true - name: Build production run: hugo --gc --minify -b https://blog.broillet.ch/ - - name: debug - run: | - ls -al . - ls -al public/ - - - name: Copy (scp) prod build to blog server - uses: https://github.com/appleboy/scp-action@v0.1.4 + - name: Copy (scp) prod build to blog server + uses: garygrossgarten/github-action-scp@release with: + local: 'public' + remote: /var/www/html/prod host: ${{ secrets.SSH_HOSTNAME }} - username: root - port: 22 - key: ${{ secrets.SSH_KEY }} - source: 'public/*' - target: '/var/www/html/prod' - rm: true - strip_components: 1 \ No newline at end of file + username: 'root' + privateKey : ${{ secrets.SSH_KEY }} + rmRemote: true + dotfiles: true \ No newline at end of file