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