Repository navigation
82 lines (67 loc) · 2.59 KB
/
Copy pathdocumentation.yml
File metadata and controls
82 lines (67 loc) · 2.59 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Deploy updated templates
on:
schedule:
- cron: "0 2 * * *" # same time as nightly is triggered
release:
types: [created]
workflow_dispatch:
jobs:
docupdate:
name: Deploy updated templates
runs-on: depot-ubuntu-24.04-arm
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7
with:
go-version-file: go.mod
id: go
- name: Build docs
run: make install docs
- name: Deploy to docs repo
uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4
with:
personal_token: ${{ secrets.DOCS_DEPLOY_TOKEN }}
publish_dir: ./templates/docs
external_repository: evcc-io/docs
publish_branch: main
destination_dir: ${{ github.event_name == 'release' && 'templates/release' || github.event_name == 'schedule' && 'templates/nightly' || 'templates/unknown_trigger' }}
allow_empty_commit: false
commit_message: ${{ github.event_name == 'release' && 'Templates update for release' || github.event_name == 'schedule' && 'Templates update for nightly' || 'Templates update unknown trigger' }}
if: success()
openapi:
name: Deploy OpenAPI spec
runs-on: depot-ubuntu-24.04-arm
permissions:
contents: read
# run on release or manual trigger, but not on schedule
if: github.event_name == 'release' || github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: voidzero-dev/setup-vp@250f29ce396baf5e8f24498e17c0dfdebabc26eb # v1
with:
node-version-file: ".node-version"
cache: true
- name: Install
run: make install-ui
- name: Prepare OpenAPI spec
run: |
mkdir -p ./openapi-deploy
npx redocly bundle ./server/openapi.yaml -o ./openapi-deploy/openapi.yaml
- name: Deploy OpenAPI spec to docs repo
uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4
with:
personal_token: ${{ secrets.DOCS_DEPLOY_TOKEN }}
publish_dir: ./openapi-deploy
external_repository: evcc-io/docs
publish_branch: main
destination_dir: public
allow_empty_commit: false
commit_message: Update OpenAPI spec
keep_files: true
if: success()