-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (52 loc) · 1.69 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Build index
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: honeycombio/gha-buildevents@v2
with:
# Required: a Honeycomb API key - needed to send traces.
apikey: ${{ secrets.BUILDEVENT_APIKEY }}
# Required: the Honeycomb dataset to send traces to.
dataset: gha-buildevents_integration
# Required on the final job: status, this will be used in the post section and sent
# as status of the trace.
# Note: in V1 this was called job-status which has been deprecated
status: ${{ job.status }}
- name: Check out repo
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- run: |-
STEP_ID=setup-go
STEP_START=$(date +%s)
go version
buildevents step $TRACE_ID $STEP_ID $STEP_START $STEP_ID
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.118.2'
extended: true
- name: Build index
run: |-
STEP_ID=build-hugo
STEP_START=$(date +%s)
hugo
buildevents step $TRACE_ID $STEP_ID $STEP_START $STEP_ID
- name: Upload index
env:
ALGOLIA_INDEX_NAME: ${{ secrets.ALGOLIA_INDEX_NAME }}
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
run: |-
STEP_ID=upload-index
STEP_START=$(date +%s)
go mod download
go run algolia.go
buildevents step $TRACE_ID $STEP_ID $STEP_START $STEP_ID