Skip to content
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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Conversation

WayneFerrao
Copy link
Contributor

@WayneFerrao WayneFerrao commented Nov 20, 2024

Adds preproduction deployment Github Action

@github-actions github-actions bot added area: build Build related issues base: main PRs targeted against main branch labels Nov 20, 2024

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

Comment on lines +37 to +42
# Step 3: Install Dependencies
- name: Install Dependencies
run: |
cd docs
pnpm i --frozen-lockfile
pnpm run build
Copy link
Contributor

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

Comment on lines +34 to +35
- name: Install pnpm
run: npm install -g pnpm
Copy link
Contributor

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?

Comment on lines +58 to +70
# 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}`
});
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: build Build related issues base: main PRs targeted against main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants