Skip to content

Case 2 - #25

Open
shafiyahnuril wants to merge 8 commits into
senpro2023:mainfrom
shafiyahnuril:main
Open

Case 2#25
shafiyahnuril wants to merge 8 commits into
senpro2023:mainfrom
shafiyahnuril:main

Conversation

@shafiyahnuril

Copy link
Copy Markdown

No description provided.

Copilot AI lite review requested due to automatic review settings September 4, 2026 02:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.yml with a test-build job (checkout, Node setup, install, build).
  • Adds a dependent deploy job that connects to a VM via appleboy/ssh-action and 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 than npm 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 thread .github/workflows/main.yml Outdated
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants