diff --git a/.github/workflows/BuildAndTestSource.yml b/.github/workflows/BuildAndTestSource.yml index 2ad0abe..8923b26 100644 --- a/.github/workflows/BuildAndTestSource.yml +++ b/.github/workflows/BuildAndTestSource.yml @@ -25,6 +25,7 @@ jobs: - name: Build with Maven run: mvn -B package --file pom.xml - name: Test with Maven + if: github.event_name == 'pull_request' && github.event.action != 'closed' run: mvn test - name: Set up SSH Key run: | @@ -42,9 +43,9 @@ jobs: echo "Switching to application directory" cd springrolls echo "Stopping the existing application" - pkill -f "java -jar springrolls-0.0.1-SNAPSHOT.jar" + pkill -f "java -jar ${{ secrets.TARGET_DIR }}/springrolls-0.0.1-SNAPSHOT.jar" echo "Start the new version of the application" - nohup java -jar springrolls-0.0.1-SNAPSHOT.jar > /dev/null 2>&1 & + nohup java -jar ${{ secrets.TARGET_DIR }}/springrolls-0.0.1-SNAPSHOT.jar > /dev/null 2>&1 & echo "Application Started!!!" exit EOF diff --git a/src/main/java/click/akshaygupta/springrolls/GreetingController.java b/src/main/java/click/akshaygupta/springrolls/GreetingController.java index 3de6be0..e8b5e3f 100644 --- a/src/main/java/click/akshaygupta/springrolls/GreetingController.java +++ b/src/main/java/click/akshaygupta/springrolls/GreetingController.java @@ -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"; }