diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml deleted file mode 100644 index 7861838..0000000 --- a/.github/workflows/dev.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: SSH Upload and Composer Install - -on: - push: - branches: - - dev - - -ci/ci-cd-for-api - -jobs: - deploy: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Install SSH key - uses: webfactory/ssh-agent@v0.5.3 - with: - ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} - - - name: Upload PHP code - run: scp -r . ${{ secrets.SERVER_USERNAME }}@${{ secrets.SERVER_HOST }}:/home/julesartd/www/api-dev-edt-3il - - - name: SSH into server and run composer install - uses: appleboy/ssh-action@master - with: - host: ${{ secrets.SERVER_HOST }} - username: ${{ secrets.SERVER_USERNAME }} - key: ${{ secrets.SSH_PRIVATE_KEY }} - script: | - cd /home/julesartd/www/api-dev-edt-3il - composer2 install \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8b13789..7861838 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1 +1,33 @@ +name: SSH Upload and Composer Install +on: + push: + branches: + - dev + - -ci/ci-cd-for-api + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install SSH key + uses: webfactory/ssh-agent@v0.5.3 + with: + ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} + + - name: Upload PHP code + run: scp -r . ${{ secrets.SERVER_USERNAME }}@${{ secrets.SERVER_HOST }}:/home/julesartd/www/api-dev-edt-3il + + - name: SSH into server and run composer install + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.SERVER_HOST }} + username: ${{ secrets.SERVER_USERNAME }} + key: ${{ secrets.SSH_PRIVATE_KEY }} + script: | + cd /home/julesartd/www/api-dev-edt-3il + composer2 install \ No newline at end of file