Skip to content

Commit

Permalink
fixing error
Browse files Browse the repository at this point in the history
  • Loading branch information
muskangupta042002 committed Sep 10, 2023
1 parent 1c15331 commit b7affa1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/BuildAndTestSource.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
cache: maven
- name: Build with Maven
if: github.event_name == 'pull_request' && github.event.action != 'closed'
run: mvn -B package --file pom.xml
run: mvn -B package --file pom.xml && ls -R
- name: Test with Maven
if: github.event_name == 'pull_request' && github.event.action != 'closed'
run: mvn test
Expand All @@ -32,7 +32,7 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: springrolls
path: ${{ secrets.JAR_FILE }}
path: target/springrolls.jar

deploy:
runs-on: ubuntu-latest
Expand All @@ -51,8 +51,9 @@ jobs:
- name: Deploy to EC2
if: github.event.pull_request.merged == true
run: |
ls -R
echo "Copying jar to EC2 Instance..."
scp -i "SpringKeyPair.pem" -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ${{ secrets.JAR_FILE }} ${{ secrets.DEV_INSTANCE_IP }}:${{ secrets.TARGET_DIR }}
scp -i "SpringKeyPair.pem" -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no target/springrolls.jar ${{ secrets.DEV_INSTANCE_IP }}:${{ secrets.TARGET_DIR }}
echo "Jar Copied successfully!!!"
echo "Attempting logging to machine..."
# SSH into the EC2 instance and restart the application
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
public class GreetingController {

@GetMapping("/greeting")
public String greeting(@RequestParam(name="name", required=false, defaultValue="World") String name, Model model) {
public String greeting(@RequestParam(name="name", required=false, defaultValue="World!") String name, Model model) {
model.addAttribute("name", name);
return "greeting";
}
Expand Down

0 comments on commit b7affa1

Please sign in to comment.