-
Notifications
You must be signed in to change notification settings - Fork 1.4k
53 lines (52 loc) · 1.78 KB
/
publish-docs.yaml
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
name: Publish docs
on:
release:
types: [published]
jobs:
publish-docs:
name: Publish docs to Netlify
if: ${{ !github.event.release.prerelease }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 #v4.1.0
with:
token: ${{ secrets.EKSCTLBOT_TOKEN }}
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe #v4.1.0
with:
go-version: 1.20.x
- name: Cache go-build and mod
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 #v3.3.2
with:
path: |
~/.cache/go-build/
~/go/pkg/mod/
key: go-${{ hashFiles('go.sum') }}
restore-keys: |
go-
- name: Setup identity as eksctl-bot
uses: ./.github/actions/setup-identity
with:
token: "${{ secrets.EKSCTLBOT_TOKEN }}"
- name: Trigger Netlify deployment
run: make publish-docs
- name: slack on success
if: success()
uses: actions-ecosystem/action-slack-notifier@fc778468d09c43a6f4d1b8cccaca59766656996a #v1.1.0
with:
slack_token: ${{ secrets.WEAVEWORKS_SLACK_EKSCTLBOT_TOKEN }}
message: ":tada: Docs published successfully :tada:"
channel: team-pitch-black
color: green
verbose: true
- name: slack on failure
if: failure()
uses: actions-ecosystem/action-slack-notifier@fc778468d09c43a6f4d1b8cccaca59766656996a #v1.1.0
with:
slack_token: ${{ secrets.WEAVEWORKS_SLACK_EKSCTLBOT_TOKEN }}
message: ":ahhhhhhhhh: Docs publishing failed."
channel: team-pitch-black
color: red
verbose: true