Skip to content

Commit

Permalink
fix for run.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
opeoniye committed Jan 1, 2024
1 parent cd821a1 commit ba7acba
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 28 deletions.
22 changes: 0 additions & 22 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,18 +128,7 @@ jobs:
echo -e "$NGX" > vhost.conf
tr -d '\r' < vhost.conf > vhost_fixed.conf
mv vhost_fixed.conf vhost.conf
echo -e "This is create-nginx-vhost step:\n\nI was here at $(date)" > ngx.txt
scp -o "StrictHostKeyChecking=no" -r vhost.conf "$HOST_USER@$HOST_URL:$GA_ENV_DEST"
scp -o "StrictHostKeyChecking=no" -r ngx.txt "$HOST_USER@$HOST_URL:$GA_ENV_DEST"
# - name: copy file via ssh key
# uses: appleboy/[email protected]
# with:
# host: ${{ secrets.HOST_URL }}
# username: ${{ secrets.HOST_USER }}
# port: 22
# key: ${{ secrets.HOST_SSH_KEY }}
# source: "vhost.conf,ngx.txt"
# target: $GA_ENV_DEST
- name: Create Nginx vhost
env:
GA_NGX_PROXY: ${{ secrets.GA_NGX_PROXY }}
Expand Down Expand Up @@ -254,18 +243,7 @@ jobs:
- name: Copy envfile
run: |
# Copy .env file into deploy server
echo -e "This is deploy-app ga step speaking\n\nI was here at $(date)" > v.txt
scp -o "StrictHostKeyChecking=no" -r "$GA_ENV_SRC/$GA_ENV_FILE" "$HOST_USER@$HOST_URL:$GA_ENV_DEST"
scp -o "StrictHostKeyChecking=no" -r v.txt "$HOST_USER@$HOST_URL:$GA_ENV_DEST"
# - name: copy envfile
# uses: appleboy/[email protected]
# with:
# host: ${{ secrets.HOST_URL }}
# username: ${{ secrets.HOST_USER }}
# port: 22
# key: ${{ secrets.HOST_SSH_KEY }}
# source: "$GA_ENV_SRC/$GA_ENV_FILE,v.txt"
# target: $GA_ENV_DEST
- name: Deploy app
run: |
ssh -T -o "StrictHostKeyChecking=no" "$HOST_USER@$HOST_URL" \
Expand Down
4 changes: 2 additions & 2 deletions ops/sh/app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ docker_build() {
case "$dkr_build" in
yes|Y|y)
echo -e "${GREEN}Building $DK_IMAGE image${RESET}"
docker build -t $DK_IMAGE -f $DL_DFILE .
docker build -t $DK_IMAGE -f $DK_FILE .
docker images | grep $DL_IU/$DL_IN
;;
no|N|n)
Expand Down Expand Up @@ -881,7 +881,7 @@ create_nginx_vhost() {
# Remove temporary files
echo -e "\nRemoving temporary files..."
rm -f "$temp_file"
#rm -f "$ngxx"
rm -f "$ngxx"
}

# function to deploy app
Expand Down
8 changes: 4 additions & 4 deletions ops/sh/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# Based on https://gist.github.com/2206527

# load .env
source ./.env
# source ./.env

# laravel things
laravel() {
Expand All @@ -26,10 +26,10 @@ laravel() {
nodejs() {
echo "\033[31mInstalling dependencies\033[0m"
# for development
if [ "$NODE_ENV" == "development"]
if [ "$NODE_ENV" == "development"]; then
npm install
# for production
elif [ "$NODE_ENV" == "production" ]
elif [ "$NODE_ENV" == "production" ]; then
npm ci --only=production
else
echo "Nodejs NODE_ENV variable not defined"
Expand All @@ -45,7 +45,7 @@ supervisor() {


# run
if ["$DL_STACK" == "laravel" ]; then
if [ "$DL_STACK" == "laravel" ]; then
laravel
supervisor
elif [ "$DL_STACK" == "nodejs" ]; then
Expand Down

0 comments on commit ba7acba

Please sign in to comment.