From 4780f19e757ac1895252d59b100a0dc058227992 Mon Sep 17 00:00:00 2001 From: noxil Date: Tue, 16 Jul 2024 14:02:15 +0200 Subject: [PATCH] actions: change webroot --- .github/workflows/deploy-dev.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy-dev.yml b/.github/workflows/deploy-dev.yml index 67ba6ef..a392682 100644 --- a/.github/workflows/deploy-dev.yml +++ b/.github/workflows/deploy-dev.yml @@ -30,10 +30,12 @@ jobs: HUGO_MATRIX_HOME_SERVER: ${{ secrets.HUGO_MATRIX_HOME_SERVER }} HUGO_GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} URL_DEVELOPMENT: ${{ vars.URL_DEVELOPMENT }} - run: hugo --minify -b "$URL_DEVELOPMENT/$GITHUB_REF_NAME" --destination "branch/$GITHUB_REF_NAME" + run: hugo --minify -b "$URL_DEVELOPMENT/$GITHUB_REF_NAME" --destination "$URL_DEVELOPMENT/$GITHUB_REF_NAME" - name: Create robots.txt - run: 'echo -e "User-agent: *\nDisallow: /" > branch/robots.txt' + env: + URL_DEVELOPMENT: ${{ vars.URL_DEVELOPMENT }} + run: 'echo -e "User-agent: *\nDisallow: /" > $URL_DEVELOPMENT/robots.txt' - name: Deploy uses: appleboy/scp-action@master @@ -41,6 +43,6 @@ jobs: host: ${{ vars.IP_DEVELOPMENT }} username: ${{ secrets.SSH_USERNAME_DEVELOPMENT }} key: ${{ secrets.SSH_KEY_DEVELOPMENT }} - source: "branch/${{ github.ref_name }}" + source: "${{ vars.URL_DEVELOPMENT }}/${{ github.ref_name }}" target: ${{ vars.WEBROOT_DEVELOPMENT}} - strip_components: 1 + rm: true