-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (44 loc) · 1.35 KB
/
deploy-web.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
51
52
53
54
55
name: Build and Deploy
on:
push:
branches:
- main
env:
NODE: 18
WORKING_DIRECTORY: packages/web
jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js ${{ env.NODE }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE }}
cache: "yarn"
cache-dependency-path: ${{ env.WORKING_DIRECTORY }}/yarn.lock
- name: Install Dependencies
run: yarn install
working-directory: ${{ env.WORKING_DIRECTORY }}
- name: Lint
run: yarn lint
working-directory: ${{ env.WORKING_DIRECTORY }}
- name: Configure AWS credentials using OIDC
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::003081160852:role/osm-gradient-deploy-s3-role
aws-region: us-east-1
- name: Build
run: npx vite build
working-directory: ${{ env.WORKING_DIRECTORY }}
- name: Deploy to S3
working-directory: ${{ env.WORKING_DIRECTORY }}
run: aws s3 sync ./dist s3://gradient.osmcha.org --delete