Skip to content

Commit

Permalink
Merge pull request #990 from hngprojects/chore/create-bulldozer-php-d…
Browse files Browse the repository at this point in the history
…eployment

updated php-boilerplater workflow
  • Loading branch information
Ravencodess authored Aug 15, 2024
2 parents d6ee65f + ffdb549 commit 5efa6a8
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/bulldozer-php-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,15 @@ jobs:
name: boilerplate-build
path: .

- name: Create .env
uses: vicradon/[email protected]
with:
action_input_file: ".env.sample"
action_output_file: ".env"
API_URL: ${{ vars.API_URL }}
NEXTAUTH_URL: ${{ vars.URL }}

- name: Copy Artifacts to server
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
source: ".env,boilerplate.tar.gz"
target: "~/var/www/boilerplate_fe/dev"
source: "boilerplate.tar.gz"
target: "/var/www/boilerplate_fe/dev"

- name: Deploy on server
uses: appleboy/ssh-action@master
Expand All @@ -52,7 +45,9 @@ jobs:
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
script: |
cd ~/var/www/boilerplate_fe/dev
cd /var/www/boilerplate_fe/dev
rm -rf .next
rm -rf public
tar -xzf boilerplate.tar.gz
rm -f boilerplate.tar.gz
pm2 restart boilerplate-frontend --update-env
pm2 restart boilerplate-frontend --update-env

0 comments on commit 5efa6a8

Please sign in to comment.