PipeItToDevNull / pastebin-swa

0 stars 0 forks source link

Post the URL of the test SWA site after building #25

Closed PipeItToDevNull closed 2 months ago

PipeItToDevNull commented 2 months ago

This may do it

      - name: Post Preview URL
        if: github.event_name == 'pull_request'
        run: |
          PR_NUMBER=$(echo ${{ github.event.number }})
          PREVIEW_URL="https://${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_HAPPY_MUSHROOM_0564BDF0F }}.azurestaticapps.net"
          curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
            -d "{\"body\": \"Preview URL: $PREVIEW_URL\"}" \
            "https://api.github.com/repos/${{ github.repository }}/issues/$PR_NUMBER/comments"