Skip to content

Glasgow 6 | Haroun Alarabi | Full-Stack-Project-Assessment | Level 300 #7

Glasgow 6 | Haroun Alarabi | Full-Stack-Project-Assessment | Level 300

Glasgow 6 | Haroun Alarabi | Full-Stack-Project-Assessment | Level 300 #7

name: Frontend S3 Deploy
on:
push:
branches:
- Level--300
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set Up Node.js
uses: actions/setup-node@v3
with:
node-version: 14
- name: Install AWS CLI
run: |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install --bin-dir /usr/local/bin --install-dir /usr/local/aws-cli --update
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS-region: us-east-1
- name : build and deploy
run: |
cd client
npm install
npm run build
aws s3 sync build/ s3://cyf-videos --delete
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Run test
run:npm test