Skip to content

🔨 Fix: 절대경로로 변경 #142

🔨 Fix: 절대경로로 변경

🔨 Fix: 절대경로로 변경 #142

Workflow file for this run

name: Deploy main
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: npm
- name: Prepare deploy script with environment variable
run: |
mkdir -p scripts
echo "doppler run --token ${DOPPLER_TOKEN} -p remak -c prd -- pm2 reload /home/ec2-user/deploy/ecosystem.json" > scripts/deploy.sh
env:
DOPPLER_TOKEN: ${{ secrets.DOPPLER_TOKEN }}
shell: bash
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Generate deployment package
run: zip -r deploy.zip . -x '*.git*'
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ap-northeast-2
- name: Upload to S3
run: aws s3 cp deploy.zip s3://remak-deploy/deploy.zip
- name: Deploy with AWS CodeDeploy
run: |
aws deploy create-deployment \
--application-name remak \
--deployment-group-name remak-prod \
--s3-location bucket=remak-deploy,key=deploy.zip,bundleType=zip