-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (46 loc) · 1.32 KB
/
ci.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: ZeroWeb Deployment
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 20.15.1
- name: Caching Gatsby
id: gatsby-cache-build
uses: actions/cache@v2
with:
path: |
public
.cache
node_modules
key: ${{ runner.os }}-gatsby-zeroweb-build-${{ github.run_id }}
restore-keys: |
${{ runner.os }}-gatsby-zeroweb-build-
- name: Test
env:
AWS_KEY: ${{ secrets.AWS_ACCESS_KEY_ID }}
run: |
echo ${#AWS_KEY}
- name: Prepare environment
run: sudo apt-get install automake libtool dpkg pkg-config nasm libpng-dev
- name: Install dependencies
run: yarn install
- name: Build
run: yarn build:ci
- 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: us-east-1
- name: Deploy to S3
run: yarn run deploy:ci
- name: Invalidate CloudFront
run: yarn run invalidate