forked from GAdevopsES/hello-color-actions
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (33 loc) · 955 Bytes
/
main.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
name: Upload Website
on:
push:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run build --if-present
- run: npm test
env:
CI: true
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: ${{ 'arn:aws:s3:::rafik-mit' }}
AWS_ACCESS_KEY_ID: ${{ 'AKIA3LET5ZQQ7KMURB2D' }}
AWS_SECRET_ACCESS_KEY: ${{ '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' }}
AWS_REGION: "us-east-1" # optional: defaults to us-east-1