diff --git a/.gitea/workflows/build_and_deploy.yaml b/.gitea/workflows/build_and_deploy.yaml index 5211872..b83b723 100644 --- a/.gitea/workflows/build_and_deploy.yaml +++ b/.gitea/workflows/build_and_deploy.yaml @@ -23,6 +23,9 @@ jobs: run: | zola build + - name: Set Destination Folder + run: echo "DEST_FOLDER=$(if [ ${{ github.ref == 'refs/heads/master' }} ]; then echo '/srv/www/cz/pkmples/www'; else echo '/srv/www/cz/pkmples/dev'; fi)" >> $GITHUB_ENV + - name: Deploy to server uses: AEnterprise/rsync-deploy@v1.0.2 env: @@ -32,5 +35,5 @@ jobs: FOLDER: "./public/" SERVER_IP: ${{ secrets.SERVER_IP }} USERNAME: ${{ secrets.USERNAME }} - #SERVER_DESTINATION: ${{ if(github.ref == 'refs/heads/master') }}/srv/www/cz/pkmples/www${{ else }}/srv/www/cz/pkmples/dev${{ endif } + SERVER_DESTINATION: ${{ env.DEST_FOLDER }}