From d86d066baf59579f12a581042ceaaecc9e2985c4 Mon Sep 17 00:00:00 2001 From: Dan Nixon Date: Sun, 1 Sep 2024 10:53:59 +0100 Subject: [PATCH] test --- .github/workflows/ci.yml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 65ebadb..160f70b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,13 +34,26 @@ jobs: run: mdbook build - name: Publish to Cloudflare Pages + id: publish uses: cloudflare/wrangler-action@v3 with: apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} accountId: e532cde53d2aaf233bc8f913f31a325f command: pages deploy book --project-name=ms-wiki-test - - name: TODO print deployment-url - env: - DEPLOYMENT_URL: ${{ steps.deploy.outputs.deployment-url }} - run: echo $DEPLOYMENT_URL + - name: View context attributes + uses: actions/github-script@v7 + with: + script: console.log(context) + + - name: Add preview comment to PR + if: github.event_name = "pull_request" + uses: actions/github-script@v7 + with: + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: '✨ you may preview these changes at <${{ steps.publish.outputs.deployment-url }}>' + })