-
Notifications
You must be signed in to change notification settings - Fork 5
36 lines (31 loc) · 1.2 KB
/
github-actions.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
name: EW Website Build/Deploy
on: [push]
jobs:
Build-Push:
runs-on: ubuntu-latest
env:
PUSH_PACKAGES: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
AWS_REGION: us-west-1 # set this to your preferred AWS region, e.g. us-west-1
steps:
- run: echo "Running build on the push of branch ${{ github.ref }}"
- name: Check out repository code
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '14'
- run: npm install
- if: ${{ env.PUSH_PACKAGES != 'true' }}
name: Build Website
run: ${GITHUB_WORKSPACE}/deploy-website.sh -b
- if: ${{ env.PUSH_PACKAGES == 'true' }}
name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}
- if: ${{ env.PUSH_PACKAGES == 'true' }}
name: Build and Deploy Website
run: ${GITHUB_WORKSPACE}/deploy-website.sh -bdc
- run: echo "🍏 This job's status is ${{ job.status }}."