From cb6fae465c2035df9ec935ac9baddf4cb9d60ddb Mon Sep 17 00:00:00 2001 From: Mathieu Broillet Date: Mon, 3 Jul 2023 14:06:06 +0000 Subject: [PATCH] Actualiser .gitea/workflows/build.yaml --- .gitea/workflows/build.yaml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 3fef656..64e0099 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -14,7 +14,9 @@ jobs: uses: https://github.com/actions/checkout@v3 - name: Install hugo - run: apt-get update -y && apt-get install hugo -y + run: | + apt-get update -y + apt-get install hugo -y - name: Init submodules run: git submodule update --init @@ -25,6 +27,9 @@ jobs: - name: Build staging run: hugo --gc --minify --buildDrafts -b https://blog.broillet.ch/ + - name: debug + run: ls -al . + - name: Copy (scp) staging build to blog server uses: https://github.com/appleboy/scp-action@v0.1.4 with: @@ -34,10 +39,15 @@ jobs: key: ${{ secrets.SSH_KEY }} source: "public/*" target: /var/www/html/staging/ + rm: true + strip_components: 1 - name: Build production run: hugo --gc --minify -b https://blog.broillet.ch/ + - name: debug + run: ls -al . + - name: Copy (scp) staging build to blog server uses: https://github.com/appleboy/scp-action@v0.1.4 with: @@ -46,4 +56,6 @@ jobs: port: 22 key: ${{ secrets.SSH_KEY }} source: "public/*" - target: /var/www/html/prod/ \ No newline at end of file + target: /var/www/html/prod/ + rm: true + strip_components: 1 \ No newline at end of file