Case 2 - #25
Open
shafiyahnuril wants to merge 8 commits into
Open
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The deploy script has a logic error (missing cd after clone) that will cause the remote build steps to run in the wrong directory and fail.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds a new GitHub Actions workflow to run a Node.js build on pushes to main, then deploy by SSH-ing into a VM to clone/pull the repo and build it there.
Changes:
- Introduces
.github/workflows/main.ymlwith atest-buildjob (checkout, Node setup, install, build). - Adds a dependent
deployjob that connects to a VM viaappleboy/ssh-actionand performs clone/pull + install + build remotely.
File summaries
| File | Description |
|---|---|
| .github/workflows/main.yml | New CI/CD workflow for build validation and SSH-based deployment build on a VM |
Review details
Suppressed comments (1)
.github/workflows/main.yml:55
- For consistency and reproducibility, the VM build should also use
npm ci(assuming package-lock.json is in the repo) rather thannpm install, otherwise deployments can drift from what CI validated.
npm install
- Files reviewed: 1/1 changed files
- Comments generated: 4
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+33
to
+36
| host: ${{ secrets.HOST }} | ||
| username: ${{ secrets.USERNAME }} | ||
| password: ${{ secrets.PASSWORD }} | ||
| port: ${{ secrets.PORT }} |
Comment on lines
+39
to
+40
| eval "$(ssh-agent -s)" | ||
| ssh-add ~/.ssh/ssh-praktikan36 |
Comment on lines
+45
to
+52
| mkdir -p "$HOME/senpro/540586/modul02" | ||
| cd "$HOME/senpro/540586/modul02" | ||
| git clone "git@github.com:${{ github.repository }}.git" | ||
| else | ||
| echo "Repository sudah ada. Building..." | ||
| cd "$HOME/senpro/540586/modul02/senpro-github-action" | ||
| git pull origin main | ||
| fi |
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
| cache: "npm" | ||
| - run: npm install |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.