-
Notifications
You must be signed in to change notification settings - Fork 81
67 lines (67 loc) · 1.89 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: filestack-js
on:
push:
branches:
- "!*"
tags:
- v*
jobs:
build:
runs-on: ubuntu-latest
steps:
# - uses: voxmedia/github-action-slack-notify-build@v1
# with:
# channel: team-charlie
# status: STARTED
# color: good
# env:
# SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
- uses: actions/checkout@v2
- name: Setup repository env
uses: actions/setup-node@v1
with:
node-version: '14.x'
registry-url: "https://registry.npmjs.org"
- name: Install deps
run: npm install --ignore-scripts
- name: Run tests
run: npm test
- name: Publish package to cdn
run: npm run publish:s3
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
- name: Publush to NPM (only on tag)
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Update code cov report
run: npm run test:codecov
- name: Prepare docs
run: npm run docs
- name: Deploy docs
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: build/docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Notify slack success
# if: success()
# env:
# SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
# uses: voxmedia/github-action-slack-notify-build@v1
# with:
# channel: team-charlie
# status: SUCCESS
# color: good
# - name: Notify slack fail
# if: failure()
# env:
# SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
# uses: voxmedia/github-action-slack-notify-build@v1
# with:
# channel: team-charlie
# status: FAILED
# color: danger