Skip to content

Update README.md

Update README.md #33

Workflow file for this run

name: Deploy to AWS
on:
push:
branches:
- main # Change this to your default branch
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '22.12' # Specify your Node.js version
- name: Cache Vue.js dependencies
uses: actions/cache@v2
with:
path: frontend/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('frontend/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies for Vue.js
run: |
cd frontend # Change to your Vue.js directory
npm install
- name: Build Vue.js app
run: |
cd frontend
npm run build
- name: Cache Node.js dependencies
uses: actions/cache@v2
with:
path: backend/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('backend/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies for Node.js
run: |
cd platform # Change to your Node.js directory
npm install
- name: Install AWS Elastic Beanstalk CLI
run: |
pip install awsebcli --upgrade --user
echo "${{ runner.tool_cache }}/python/bin" >> $GITHUB_PATH
- name: Deploy to AWS
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'eu-north-1' # Change to your AWS region
run: |
# Deploy your Node.js app (example using Elastic Beanstalk)
cd platform
eb init -p node.js --region $AWS_REGION
eb use Abid-env-1
eb deploy --label github-actions-${{ github.run_id }}
- name: Upload Vue.js build to S3
run: |
aws s3 sync frontend/dist s3://frontendvuelivecollab --delete