generated from CS3219-AY2324S1/course-assessment-template
-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (34 loc) · 1.08 KB
/
frontend_push.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
name: Frontend Pulumi Update
on:
push:
branches: ["master"]
paths: ["frontend/**"]
env:
WORKING_DIRECTORY_INFRA: ./frontend/infra
STACK_NAME: ${{ github.ref == 'refs/heads/master' && 'cs3219/frontend-infra/prod' || 'cs3219/frontend-infra/staging'}}
jobs:
update:
name: Update
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ env.WORKING_DIRECTORY_INFRA }}
steps:
- uses: actions/checkout@v4
- uses: actions/[email protected]
with:
node-version: 16.15.0
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-region: ${{ secrets.AWS_REGION }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- run: npm install
- uses: pulumi/actions@v3
with:
work-dir: ${{ env.WORKING_DIRECTORY_INFRA }}
command: up
stack-name: ${{ env.STACK_NAME }}
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}