test #15
This file contains 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
name: Backend CD | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check username | |
run: echo "${{secrets.USERNAME}}" | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: "11" | |
distribution: "adopt" | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set execute permissions for Gradle Wrapper | |
run: chmod +x ./gradlew | |
- name: Build with Gradle For RestDocs | |
run: ./gradlew bootJar | |
- name: Build with Gradle | |
run: ./gradlew bootJar | |
- name: Run Application use SSH | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{secrets.HOST}} | |
username: ${{secrets.USERNAME}} | |
password: ${{secrets.PASSWORD}} | |
script_stop: true | |
script: sh /root/gigacoffee/deploy.sh |