-
Notifications
You must be signed in to change notification settings - Fork 15
47 lines (44 loc) · 1.27 KB
/
build.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
on:
push:
branches:
- master
env:
NODE_VERSION: "10.x"
jobs:
build-and-deploy:
name: Build and Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- name: Clean up
run: |
rm -rf styles/main.css
- name: Install
run: |
npm i -g bower
npm install
bower install
- name: Build
run: |
npm run build
- uses: jakejarvis/s3-sync-action@master
with:
args: --follow-symlinks --delete
env:
AWS_S3_BUCKET: sites-frontend
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: "eu-central-1"
SOURCE_DIR: "docs"
DEST_DIR: "old-rs-school"
# - name: Invalidate
# run: |
# aws cloudfront create-invalidation --distribution-id E13GQ210A1DMQY --paths "/*"
# env:
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
# AWS_REGION: "eu-central-1"