chore: trigger dev deployment #1
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
| name: TOMO Dev CI-CD | |
| on: | |
| push: | |
| branches: [ "dev" ] | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x ./gradlew | |
| - name: Build with Gradle | |
| run: ./gradlew clean build -x test | |
| - name: Upload JAR to Oracle Cloud | |
| uses: appleboy/scp-action@v0.1.7 | |
| with: | |
| host: ${{ secrets.OCI_HOST }} | |
| username: ${{ secrets.OCI_USER }} | |
| key: ${{ secrets.OCI_SSH_KEY }} | |
| port: ${{ secrets.OCI_PORT }} | |
| source: "build/libs/TOMO-0.0.1-SNAPSHOT.jar" | |
| target: "/home/ubuntu/app" | |
| - name: Restart TOMO service | |
| uses: appleboy/ssh-action@v1.0.3 | |
| with: | |
| host: ${{ secrets.OCI_HOST }} | |
| username: ${{ secrets.OCI_USER }} | |
| key: ${{ secrets.OCI_SSH_KEY }} | |
| port: ${{ secrets.OCI_PORT }} | |
| script: | | |
| sudo systemctl restart tomo | |