-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (40 loc) · 1.15 KB
/
build_deploy_speer_portfolio_app.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
name: 'Build Deploy Speer Porftolio Website'
on:
push:
branches: [ 'main' ]
paths:
- 'projects/website/speerportfolio/**'
- '!projects/website/speerportfolio/README.md'
workflow_dispatch:
branches: [ 'main' ]
inputs:
awsRegion:
type: choice
default: 'us-east-2'
options:
- 'us-east-2'
- 'us-east-1'
jobs:
build_deploy:
name: 'Build/Deploy App'
runs-on: ubuntu-latest
environment: production
env:
AWS_REGION: ${{ inputs.awsRegion || 'us-east-2' }}
defaults:
run:
shell: bash
working-directory: projects/website
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Configure AWS
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.PROD_USER_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.PROD_USER_AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}
- name: Build & Upload
run: ./build_upload.sh ${{ secrets.AWS_BUCKET_NAME }}
- name: Deploy
run: ./deploy.sh ${{ secrets.AWS_BUCKET_NAME }}