-
Notifications
You must be signed in to change notification settings - Fork 18
70 lines (57 loc) · 1.79 KB
/
developer.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Publish
on:
workflow_dispatch:
repository_dispatch:
push:
branches:
- master
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: '16'
# Build Content
- run: npm install
- run: npm run lint
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: '16'
- run: npm install
- run: npm run build:production
# Move _ to static/assets
- run: mkdir -p build/site/static
- run: mv build/site/_ build/site/static/assets
# Sync all files to S3
- name: Sync to Static
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --exclude 'build/site/developer/index.html'
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_S3_REGION }}
SOURCE_DIR: 'build/site/'
# - name: Invalidate CloudFront Cache
# uses: chetan/invalidate-cloudfront-action@v2
# env:
# DISTRIBUTION: ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION }}
# PATHS: "/*"
# AWS_REGION: ${{ secrets.AWS_S3_REGION }}
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# Index into Algolia
# - run: npm run index
# env:
# ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
# ALGOLIA_APPLICATION_ID: ${{ secrets.ALGOLIA_APPLICATION_ID }}
# ALGOLIA_INDEXES: ${{ secrets.ALGOLIA_INDEXES }}