-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[No QA] Include deploy comment after merge #49951
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
9395526
Include deploy comment after merge
roryabraham e7a8ae9
Include dummy change to test comment
roryabraham 6f5337e
Include the workflow itself in the paths for builds
roryabraham 8ff2d12
Include link to workflow run
roryabraham 5f9a9e3
Fix NOWDOC
roryabraham File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ on: | |
- main | ||
paths: | ||
- 'help/**' | ||
- './.github/workflows/deployNewHelp.yml' | ||
|
||
# Run on any pull request (except PRs against staging or production) that has | ||
# changes to the help directory. This will cause it to deploy this unmerged branch to | ||
|
@@ -17,7 +18,7 @@ on: | |
branches-ignore: [staging, production] | ||
paths: | ||
- 'help/**' | ||
|
||
- './.github/workflows/deployNewHelp.yml' | ||
# Run on any manual trigger | ||
workflow_dispatch: | ||
|
||
|
@@ -69,14 +70,33 @@ jobs: | |
projectName: newhelp | ||
directory: ./help/_site # Deploy the built site | ||
|
||
# After deploying to Cloudflare, share wherever it deployed to in the PR comment. | ||
# After deploying Cloudflare preview build, share wherever it deployed to in the PR comment. | ||
- name: Leave a comment on the PR | ||
uses: actions-cool/[email protected] | ||
if: ${{ env.IS_PR_FROM_FORK != 'true' }} | ||
if: ${{ github.event_name == 'pull_request' && env.IS_PR_FROM_FORK != 'true' }} | ||
with: | ||
token: ${{ github.token }} | ||
body: ${{ format('Your New Help changes have been deployed to {0} :zap:️', steps.cloudflarePagesAction.outputs.alias) }} | ||
|
||
- name: Get merged pull request | ||
if: ${{ github.event_name == 'push' }} | ||
id: getMergedPullRequest | ||
uses: actions-ecosystem/action-get-merged-pull-request@59afe90821bb0b555082ce8ff1e36b03f91553d9 | ||
with: | ||
github_token: ${{ github.token }} | ||
|
||
- name: Leave a comment on the PR after it's merged | ||
if: ${{ github.event_name == 'push' }} | ||
run: | | ||
gh pr comment ${{ steps.getMergedPullRequest.outputs.number }} --body "$(cat <<'EOF' | ||
🚀Deployed to [NewHelp production](https://newhelp.expensify.com)! 🚀 | ||
|
||
([_View deploy workflow run_](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})) | ||
EOF | ||
)" | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
|
||
# Use the Cloudflare CLI... | ||
- name: Setup Cloudflare CLI | ||
if: ${{ env.IS_PR_FROM_FORK != 'true' }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,9 @@ If you are a developer comfortable working on the command line, you can edit the | |
### The easy way: edit on Github | ||
If you don't want to set up your own local dev environment, feel free to just edit the help materials directly from Github: | ||
|
||
1. ... give instructions here ... | ||
1. Open whatever file you want. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Really just including this change so there would be a diff in |
||
2. Replace `github.com` with `github.dev` in the URL | ||
3. Edit away! | ||
|
||
## How to add a page | ||
The current design of NewHelp.expensify.com is only to have a very small handful pages (one for each "product"), each of which is a markdown file stored in `/help` using the `product` template (defined in `/help/_layouts/product.html`). Accordingly, it's very unlikely you'll be adding a new page. | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just
.github/workflows/deployNewHelp.yml
-- why lead with./
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
discussed, NAB