Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Allison67 committed Dec 6, 2023
1 parent 6f2dfa0 commit 118889c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 32 deletions.
39 changes: 15 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@ jobs:
with:
node-version: "18"

- name: "Create Back-end .env File"
run: |
touch .env
echo FRONT_END_DOMAIN=${{ secrets.FRONT_END_DOMAIN }} >> .env
echo REACT_APP_BACKEND=${{ secrets.REACT_APP_BACKEND }} >> .env
echo JWT_SECRET=${{ secrets.JWT_SECRET }} >> .env
echo JWT_EXP_DAYS=${{ secrets.JWT_EXP_DAYS }} >> .env
echo MONGODB_URI=${{ secrets.MONGODB_URI }} >> .env
echo AVATAR_GENERATOR=${{ secrets.AVATAR_GENERATOR }} >> .env
working-directory: ./back-end

- name: Install front-end dependencies
run: |
cd front-end
Expand All @@ -31,30 +42,10 @@ jobs:
cd back-end
npm install
- name: List contents of the models directory
run: ls -l ./back-end/models/

# - name: Run back-end tests
# run: |
# cd back-end
# npm test
- name: Run back-end tests
run: |
cd back-end
npm test
# - name: Build and run Docker containers
# run: docker-compose up --build

- name: Deploy React and Express App
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.DROPLET_IP }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
username: ${{ secrets.SSH_USER }}
script: |
cd 4-final-project-group-bill-splitting-app
git pull
cd front-end
npm install
npm start
cd ../back-end
npm install
npm start
echo 'Success'
20 changes: 12 additions & 8 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,15 @@ jobs:
username: ${{ secrets.SSH_USER }}
script: |
cd 4-final-project-group-bill-splitting-app
git pull
cd front-end
npm install
npm start
cd ../back-end
npm install
npm start
echo 'Success'
git pull origin master
docker-compose down
docker-compose up --build -d
# git pull
# cd front-end
# npm install
# npm start
# cd ../back-end
# npm install
# npm start
# echo 'Success'

0 comments on commit 118889c

Please sign in to comment.