Docs: Create README.md #12
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: Automatically Deployment | |
on: [push] | |
jobs: | |
deployment: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- name: Setting .env | |
run: | | |
echo "REACT_APP_KEY=$REACT_APP_PUBLIC_KEY" >> .env | |
echo "SECRET_KEY=django-insecure-$u$^9x3sg-u7j()=q(27pa0*e2&c&)sy&t%!bq050f_7cz14fb" >> .env | |
echo "REACT_APP_KAKAO_REST_API_KEY=2dc48527e5e39387041776ecb210def7" >> .env | |
echo "REACT_APP_KAKAO_JAVASCRIPT_KEY=a1f6381f3fff2a9900ebcbf1623543eb" >> .env | |
echo "REACT_APP_EMAIL_USER=hack.safet@gmail.com" >> .env | |
echo "REACT_APP_EMAIL_PASSWORD=safeT0703" >> .env | |
echo "REACT_APP_SMTP_APP_KEY=lore dqky anrk dwzf" >> .env | |
- name: Install dependencies | |
run: yarn install | |
- name: Build project | |
run: yarn build | |
- name: Deploy to AWS | |
run: | | |
aws s3 sync build/ s3://your-bucket-name | |
aws cloudfront create-invalidation --distribution-id your-distribution-id --paths "/*" | |
- name: Start application with PM2 | |
run: | | |
pm2 delete all || true | |
pm2 start yarn --name "app" -- start | |
pm2 list |