forked from CodeYourFuture/Full-Stack-Project-Assessment
-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (42 loc) · 1.07 KB
/
aws.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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