Skip to content

Commit

Permalink
add .github
Browse files Browse the repository at this point in the history
  • Loading branch information
crash1522 committed Feb 8, 2024
1 parent 3493901 commit 2edf222
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Deploy RecBOJ Backend
on:
push:
branches:
- test-gh-action

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
- run: docker build -t wjddn/recboj-test -f Dockerfile.dev .
- run: docker run -e CI=true wjddn/recboj-test npm test
- working-directory: ./ChromeExtension/server

- name: Generate deployment package
run: bash deploy.sh

- name: Deploy to EB
uses: einaregilsson/beanstalk-deploy@v18
with:
aws_access_key: ${{ secrets.AWS_ACCESS_KEY }}
aws_secret_key: ${{ secrets.AWS_SECRET_KEY }}
application_name: docker-gitaction
environment_name: docker-gitaction
existing_bucket_name: elasticbeanstalk-eu-north-1-900478210705
region: eu-north-1
version_label: ${{ github.sha }}
deployment_package: deploy.zip
3 changes: 3 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# deploy.sh
cd ChromeExtension/server
zip -r deploy.zip . -x '*.ipynb'

0 comments on commit 2edf222

Please sign in to comment.