Feat/deploy #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test the application | |
on: [pull_request] | |
jobs: | |
test: | |
name: Run tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Run backend unit tests | |
run: docker compose run backend sh -c "yarn test" | |
- name: Run backend e2e tests | |
run: docker compose run backend sh -c "yarn test:e2e" | |
- name: Deploy | |
run: | | |
echo "$EC2_SSH_KEY" > ssh_key | |
chmod 600 ssh_key | |
ssh -i ssh_key [email protected] << EOF | |
cd /home/ubuntu/pong | |
git pull | |
make prod |