-
Notifications
You must be signed in to change notification settings - Fork 9
43 lines (37 loc) · 1.06 KB
/
deploy.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
name: Deployment to S3
on:
workflow_dispatch:
inputs:
name:
description: "Reason"
push:
branches:
- master
concurrency:
group: deploy-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
if: github.repository == 'IBM-Design/ai-design'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 12.x
uses: actions/setup-node@v2-beta
with:
node-version: 12.x
- name: Install packages
run: npm install
- name: Build site
run: npm run build
- uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: ${{ secrets.COS_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.COS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.COS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.COS_REGION }}
AWS_S3_ENDPOINT: https://${{ secrets.COS_ENDPOINT }}
SOURCE_DIR: 'public/design/ai'
DEST_DIR: 'design/ai'