-
Notifications
You must be signed in to change notification settings - Fork 4
42 lines (38 loc) · 1.23 KB
/
build.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
on:
push:
branches:
- main
# Make sure there is only one deployment running at
# the same time. See https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
env:
AWS_REGION: 'us-east-1'
TF_BACKEND_BUCKET: 'wing-voting-app-tfstate'
TF_BACKEND_BUCKET_REGION: 'us-east-1'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Build website
run: |
cd website
npm install
npm run build
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
role-session-name: gh-actions-winglang # makes it easy to identify, e.g. in AWS Cloudtrail
aws-region: ${{ env.AWS_REGION }}
- name: Deploy Winglang App
uses: winglang/wing-github-action/actions/deploy@828c1b5de735ea5489194776483d423df1f7a401
with:
entry: main.w
target: 'tf-aws'