add missing let #64
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: Deploy dev to beanstalk | |
on: | |
push: | |
branches: | |
- dev | |
- stage | |
workflow_dispatch: | |
jobs: | |
deploy: | |
# if branch is dev use dev-deployment environment, otherwise use stage-deployment | |
environment: ${{ github.ref == 'refs/heads/dev' && 'dev-deployment' || 'stage-deployment' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js 18 | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 18.18.0 | |
- name: cache node modules | |
id: cache_ui_deps | |
uses: actions/cache@v2 | |
with: | |
path: node_modules | |
key: ${{ runner.OS }}-build-${{ hashFiles('package.json') }} | |
- name: cache server node modules | |
id: cache_server_deps | |
uses: actions/cache@v2 | |
with: | |
path: server/node_modules | |
key: ${{ runner.OS }}-build-${{ hashFiles('server/package.json') }} | |
- name: install dependencies | |
if: steps.cache_ui_deps.outputs.cache-hit != 'true' | |
env: | |
NODE_OPTIONS: --openssl-legacy-provider | |
run: | | |
npm install | |
- name: install server dependencies | |
if: steps.cache_server_deps.outputs.cache-hit != 'true' | |
working-directory: ./server | |
env: | |
NODE_OPTIONS: --openssl-legacy-provider | |
run: | | |
npm install | |
- name: build | |
env: | |
NODE_OPTIONS: --openssl-legacy-provider | |
CI: false | |
run: | | |
npm run build | |
- name: install python3 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install pip | |
run: | | |
python -m pip install --upgrade pip | |
- name: Install Elastic Beanstalk CLI | |
run: | | |
pip install awsebcli --upgrade --user | |
- name: Deploy to dev.heo.finance | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_REGION: ${{ vars.AWS_REGION }} | |
run: | | |
eb init ${{ vars.EB_APP_NAME }} -r ${{ vars.AWS_REGION }} -p "Node.js 18 running on 64bit Amazon Linux 2023" | |
eb deploy ${{ vars.EB_ENV_NAME }} --region ${{ vars.AWS_REGION }} --label ${{ github.sha }} --debug | |