File tree Expand file tree Collapse file tree 2 files changed +53
-4
lines changed Expand file tree Collapse file tree 2 files changed +53
-4
lines changed Original file line number Diff line number Diff line change 37
37
run : yarn lint
38
38
working-directory : ${{ env.WORKING_DIRECTORY }}
39
39
40
- - name : Deploy to surge
41
- run : yarn deploy
40
+ - name : Configure AWS credentials using OIDC
41
+ uses : aws-actions/configure-aws-credentials@v2
42
+ with :
43
+ role-to-assume : arn:aws:iam::003081160852:role/osm-gradient-deploy-s3-role
44
+ aws-region : us-east-1
45
+
46
+ - name : Build
47
+ run : vite build
48
+ working-directory : ${{ env.WORKING_DIRECTORY }}
49
+
50
+ - name : Deploy to S3
42
51
working-directory : ${{ env.WORKING_DIRECTORY }}
43
- env :
44
- SURGE_TOKEN : ${{ secrets.SURGE_TOKEN }}
52
+ run : aws s3 sync ./dist s3://gradient.osmcha.org --delete
Original file line number Diff line number Diff line change
1
+ name : Surge PR Preview
2
+
3
+ on : [pull_request]
4
+
5
+ env :
6
+ NODE : 18
7
+ WORKING_DIRECTORY : packages/web
8
+
9
+ jobs :
10
+ preview :
11
+ runs-on : ubuntu-latest
12
+ permissions :
13
+ pull-requests : write # allow surge-preview to create/update PR comments
14
+ steps :
15
+ - name : Checkout
16
+ uses : actions/checkout@v3
17
+
18
+ - name : Use Node.js ${{ env.NODE }}
19
+ uses : actions/setup-node@v3
20
+ with :
21
+ node-version : ${{ env.NODE }}
22
+ cache : " yarn"
23
+ cache-dependency-path : ${{ env.WORKING_DIRECTORY }}/yarn.lock
24
+
25
+ - name : Install Dependencies
26
+ run : yarn install
27
+ working-directory : ${{ env.WORKING_DIRECTORY }}
28
+
29
+ - name : Lint
30
+ run : yarn lint
31
+ working-directory : ${{ env.WORKING_DIRECTORY }}
32
+
33
+ - uses : afc163/surge-preview@v1
34
+ id : preview_step
35
+ with :
36
+ surge_token : ${{ secrets.SURGE_TOKEN }}
37
+ dist : dist
38
+ build : |
39
+ vite build
40
+ - name : Get the preview_url
41
+ run : echo "url => ${{ steps.preview_step.outputs.preview_url }}"
You can’t perform that action at this time.
0 commit comments