Skip to content

Commit

Permalink
updated github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Allison67 committed Dec 6, 2023
1 parent 873d4f4 commit 6f2dfa0
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci-cd.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ jobs:
- 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
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Deploy Application

on:
workflow_dispatch:
push:
branches:
- cicd
pull_request:
branches:
- cicd

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- 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'

0 comments on commit 6f2dfa0

Please sign in to comment.