You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 28, 2022. It is now read-only.
Hello @South-Paw,
I can make a PR with the modifications I made to your action, however I do not have any tests and I'm no longer using a it, so I can't guarantee it won't introduce any bugs 😅
I prefer going with a manual approach for my scripts, which provides more granular control with an acceptable amount of boilerplate in my opinion, here it is if you're interested.
In my opinion this approach is overall better in a lot of scenarios, for example if you plan to use the deployed URL in another step later, or want to customise the message (although all of this could be implemented in the action...)
- name: Deploy website preview to Netlifyid: deploy# Manually run the netlify deploy command, which gives more granular control about version/flags etcrun: | RESULT=$(pnpm deploy:preview) echo "::set-output name=result::$(echo $RESULT)"
- name: Comment on PRuses: actions/github-script@v6id: deploy-preview-urlwith:
result-encoding: stringscript: | const resultString = "'${{ steps.deploy.outputs.result }}'" const [logUrl, url] = resultString.match(/https:\/\/\S+/gim) const body = `### 🛸 Website Deploy Preview is live 🏌️♀️ | | URL | | --- | --- | | 📝 Deploy logs| ${logUrl} | | 🌍 Preview | ${url} | > Deployed by Netlify` const { sha, repo: { owner , repo }, issue: { number }} = context const prComment = await github.rest.issues.createComment({ issue_number: number, owner, repo, body }) console.log({ prComment }) return url
Let me know if you still want the PR.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
@Hebilicious, you don't have issues open on your repo, but seems like you made some great improvements to the action (awesome job!)
Feel free to propose a PR back here to merge them into this repo 👍
The text was updated successfully, but these errors were encountered: