File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11
2- # name: Upload Frontend
3- # 'on':
4- # push:
5- # branches:
6- # - main
7- # # paths: null
8- # jobs:
9- # build:
10- # runs-on: ubuntu-latest
11- # steps:
12- # - name: Checkout code
13- # uses: actions/checkout@v3
14- # - name: Set up Node.js
15- # uses: actions/setup-node@v3
16- # - name: Install dependencies
17- # run: npm install
18- # working-directory: ./client
19- # - name: Build app
20- # run: npm run build
21- # working-directory: ./client
22- # - name: Upload to S3
23- # uses: aws-actions/configure-aws-credentials@v2
24-
25- # with:
26- # aws-access-key-id: '${{ secrets.AWS_ACCESS_KEY_ID }}'
27- # aws-secret-access-key: '${{ secrets.AWS_SECRET_ACCESS_KEY }}'
28- # aws-region: eu-west-2
29- # - name: Deploy static site to S3 bucket
30- # run: aws s3 sync ./client/build s3://reccomendationsh --delete
2+ # This workflow will build the frontend and upload it to an S3 bucket
313name : Upload Frontend
324' on ' :
335 push :
4113 NODE_OPTIONS : --openssl-legacy-provider
4214 steps :
4315 - name : Checkout code
44- uses : actions/checkout@v3
16+ uses : actions/checkout@v3 # GitHub-provided checkout action to clone my repository into the runner.
4517 - name : Set up Node.js
46- uses : actions/setup-node@v3
18+ uses : actions/setup-node@v3 # Installs Node.js in the runner, so JavaScript commands can be executed.
4719 - name : Install dependencies
4820 run : npm install
4921 working-directory : ./client
5729 aws-secret-access-key : ' ${{ secrets.AWS_SECRET_ACCESS_KEY }}'
5830 aws-region : eu-west-2
5931 - name : Deploy static site to S3 bucket
60- run : aws s3 sync ./client/build s3://reccomendationsh --delete
32+ run : aws s3 sync ./client/build s3://reccomendationsh --delete # Upload the build to S3 (aws s3 sync)
33+
34+
Original file line number Diff line number Diff line change 1+ # we use this file to run our containers
12version : ' 3'
23
34services :
@@ -6,5 +7,6 @@ services:
67 container_name : nice_williamson
78 restart : always
89 ports :
10+ # we map the container port to the host port -- host:container
911 - " 3000:3000"
1012
You can’t perform that action at this time.
0 commit comments