Merge pull request #64 from Project-Testify/DEAMON #56
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: Deploy Spring Boot Application | |
| # on: | |
| # push: | |
| # branches: | |
| # - release # Set this to the branch you want to deploy from | |
| # jobs: | |
| # build: | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - name: Checkout code | |
| # uses: actions/checkout@v2 | |
| # - name: Set up JDK 21 | |
| # uses: actions/setup-java@v2 | |
| # with: | |
| # java-version: '21' | |
| # distribution: 'adopt' | |
| # - name: Build with Maven | |
| # run: mvn -B package --file pom.xml -DskipTests | |
| # - name: Upload Artifacts | |
| # uses: actions/upload-artifact@v2 | |
| # with: | |
| # name: Testify-Backend.jar | |
| # path: target/Testify-Backend.jar | |
| # deploy: | |
| # needs: build | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - name: Download Artifact | |
| # uses: actions/download-artifact@v2 | |
| # with: | |
| # name: Testify-Backend.jar | |
| # - name: Environment variables | |
| # run: echo "${{ secrets.ENV }}" >> .env | |
| # - name: Copy files via SCP | |
| # uses: appleboy/scp-action@master | |
| # with: | |
| # host: ${{ secrets.DIGITALOCEAN_IP }} | |
| # username: ${{ secrets.DIGITALOCEAN_USERNAME }} | |
| # key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| # port: 22 | |
| # # copy jar and .env file | |
| # source: "*" | |
| # target: "/opt/testify/backend" | |
| # # deploy: | |
| # # runs-on: ubuntu-latest | |
| # # needs: build | |
| # # steps: | |
| # # - name: Checkout code | |
| # # uses: actions/checkout@v2 | |
| # # - name: Copy files via SCP | |
| # # uses: appleboy/scp-action@master | |
| # # with: | |
| # # host: ${{ secrets.DIGITALOCEAN_IP }} | |
| # # username: ${{ secrets.DIGITALOCEAN_USERNAME }} | |
| # # key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| # # port: 22 | |
| # # source: "target/*.jar" # Adjust based on where your build artifacts are located | |
| # # target: "/opt/testify/backend" # Adjust based on where you want to copy the files | |
| # - name: Restart server | |
| # uses: appleboy/ssh-action@master | |
| # with: | |
| # host: ${{ secrets.DIGITALOCEAN_IP }} | |
| # username: ${{ secrets.DIGITALOCEAN_USERNAME }} | |
| # key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| # port: 22 | |
| # script: | | |
| # systemctl stop testify | |
| # systemctl start testify |