File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919
2020 - name : Run tests in Docker container
2121 run : docker run -e CI=true cygnetops/react-test npm test
22+
23+ deploy :
24+ needs : docker-test
25+ runs-on : ubuntu-latest
26+
27+ steps :
28+ - name : Checkout repo
29+ uses : actions/checkout@v4
30+
31+ - name : Set up Node.js
32+ uses : actions/setup-node@v4
33+ with :
34+ node-version : ' 22.x'
35+
36+ - name : Install dependencies
37+ run : npm ci
38+
39+ - name : Build the app
40+ run : npm run build --if-present
41+
42+ - name : Clean up node_modules (optional)
43+ run : rm -rf node_modules
44+
45+ - name : Generate deploy package (zip)
46+ run : |
47+ zip -r deploy.zip . \
48+ -x "*.git*" \
49+ "node_modules/*" \
50+ ".github/*" \
51+ "*.test.js" \
52+ "*.md"
53+
54+ - name : Deploy to Elastic Beanstalk
55+ uses : einaregilsson/beanstalk-deploy@v18
56+ with :
57+ aws_access_key : ${{ secrets.AWS_ACCESS_KEY }}
58+ aws_secret_key : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
59+ application_name : frontend
60+ environment_name : Frontend-env
61+ existing_bucket_name : elasticbeanstalk-ap-southeast-2-376578549272
62+ region : ap-southeast-2
63+ version_label : ${{ github.sha }}
64+ deployment_package : deploy.zip
You can’t perform that action at this time.
0 commit comments