diff --git a/.gitea/workflows/deployArtifactToWebserver.yaml b/.gitea/workflows/deployArtifactToWebserver.yaml index 22bb751..d9de76e 100644 --- a/.gitea/workflows/deployArtifactToWebserver.yaml +++ b/.gitea/workflows/deployArtifactToWebserver.yaml @@ -39,17 +39,15 @@ jobs: upload_name=${{ inputs.uploadName }} fi - upload_path=${{ inputs.uploadDir }} - - echo "Uploading $upload_name" - curl -d --binary-data @./$upload_name "${{ vars.WEB_DEPLOY_URL }}${{ inputs.dir }}/$upload_name" + echo "Uploading $upload_name to ${{ vars.WEB_DEPLOY_URL }}${{ inputs.dir }}/$upload_name" + curl -H "Authorization: Bearer ${{ vars.WEB_DEPLOY_TOKEN }}" -d --binary-data @./$upload_name "${{ vars.WEB_DEPLOY_URL }}${{ inputs.dir }}/$upload_name" echo "Uploading finished $upload_name" echo "TXT filename is '${{ inputs.txtFileName }}'" if [ "${{ inputs.txtFileName }}" != "-" ]; then - echo "Uploading additional text file ${{ inputs.txtFileName }}" + echo "Uploading additional text file ${{ inputs.txtFileName }} to ${{ vars.WEB_DEPLOY_URL }}${{ inputs.dir }}/${{ inputs.txtFileName }}" printf "%b" "${{ inputs.txtFileContent }}" > ${{ inputs.txtFileName }} - curl -d --binary-data @./${{ inputs.txtFileName }} "${{ vars.WEB_DEPLOY_URL }}${{ inputs.dir }}/${{ inputs.txtFileName }}" + curl -H "Authorization: Bearer ${{ vars.WEB_DEPLOY_TOKEN }}" -d --binary-data @./${{ inputs.txtFileName }} "${{ vars.WEB_DEPLOY_URL }}${{ inputs.dir }}/${{ inputs.txtFileName }}" else echo "No additional text file to upload." fi