-
Notifications
You must be signed in to change notification settings - Fork 3
45 lines (36 loc) · 1.12 KB
/
publish.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
name: Publish
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Get Branch Name
shell: bash
run: echo "::set-output name=name::$(bash scripts/branchname.sh)"
id: branch
- name: Setup
run: npm install
- name: Build Documentation
run: npm run build
- name: Deploy to Github Pages
id: deploy_step
if: steps.branch.outputs.name == 'master'
uses: crazy-max/[email protected]
with:
target_branch: gh-pages
keep_history: true
build_dir: docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Send Failure notification to Slack
if: always() && steps.deploy_step.outcome == 'failure'
run: npm run info_slack_failure
env:
SLNL: ${{ secrets.SLNL }}
- name: Send Success notification to Slack
if: always() && steps.deploy_step.outcome == 'success'
run: npm run info_slack_success
env:
SLNL: ${{ secrets.SLNL }}