-
Notifications
You must be signed in to change notification settings - Fork 10
54 lines (45 loc) · 1.34 KB
/
build-and-release.yml
File metadata and controls
54 lines (45 loc) · 1.34 KB
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
name: Build and publish academy
on:
release:
types: [published]
workflow_dispatch:
inputs:
orgId:
description: 'Organization ID'
required: true
token:
description: 'Bearer token'
required: true
academy-name:
required: false
default: "Digital Ocean Academy"
type: string
version:
description: 'Module version'
required: false
default: ''
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout site
uses: actions/checkout@v5
- name: Setup Hugo Extended
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.147.9'
extended: true
- name: Install dependencies
run: make setup
- name: Run production build test
run: make build
- name: Publish to Cloud Academy
id: academy
uses: layer5io/academy-build@v0.1.5
with:
orgId: ${{ github.event.inputs.orgId || secrets.ACADEMY_ORG_ID }}
token: ${{ github.event.inputs.token || secrets.PROVIDER_TOKEN }}
academy-name: "Digital Ocean Academy"
version: ${{ github.event.inputs.version != '' && github.event.inputs.version || github.ref_name }}
- name: Show response
run: echo "${{ steps.academy.outputs.response }}"