-
Notifications
You must be signed in to change notification settings - Fork 533
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
Create preproductionDeployment.yml #23167
base: main
Are you sure you want to change the base?
Conversation
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.
Copilot reviewed 1 out of 1 changed files in this pull request and generated no suggestions.
Tip: Copilot code review supports C#, Go, Java, JavaScript, Markdown, Python, Ruby and TypeScript, with more languages coming soon. Learn more
# Step 3: Install Dependencies | ||
- name: Install Dependencies | ||
run: | | ||
cd docs | ||
pnpm i --frozen-lockfile | ||
pnpm run build |
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.
I'd suggest splitting the actual build into its own step
- name: Install pnpm | ||
run: npm install -g pnpm |
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.
I wonder if corepack enable
would accomplish the same thing here. It's what we have to run locally during a first-time setup of the repo. @tylerbutler might know?
# Step 5: Post Deployment Feedback (Optional) | ||
- name: Post Deployment URL as PR Comment | ||
if: success() | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
const url = '${{ steps.deploy.outputs.preview_url }}'; | ||
github.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: `✅ **Pre-production Deployment Successful** 🚀\n\nYou can view the changes here: ${url}` | ||
}); |
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.
What happens if there's two concurrent PRs making changes to the site? Does each of them get their own separate URL?
Adds preproduction deployment Github Action