Skip to content

Update and rename push-to--Dockerhub to push-to--Dockerhub.yml #41

Update and rename push-to--Dockerhub to push-to--Dockerhub.yml

Update and rename push-to--Dockerhub to push-to--Dockerhub.yml #41

Workflow file for this run

name: Node.js CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '20.x'
- run: ls
- run: npm install
working-directory: client
- run: npm run build
working-directory: client
env:
CI: false
- uses: actions/upload-artifact@v3
with:
name: build-artifact
path: client/build/
deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: build-artifact
path: client/build
- name: Deploy to S3
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
aws s3 cp \
--recursive \
--region eu-west-2 \
client/build s3://my-youtube-site