-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (59 loc) · 1.57 KB
/
main.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
name: TED-SWS documentation
on:
push:
branches:
- main
- 'feature/**'
paths:
- 'docs/**'
pull_request:
types:
- closed
branches:
- master
paths:
- 'docs/**'
env:
SITE_DIR: 'site'
jobs:
build_site:
name: "Build site with Antora"
runs-on: [ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: "Generate site using antora site action"
uses: kameshsampath/antora-site-action@master
with:
antora_playbook: ./docs/antora-playbook.yml
- name: "Upload generated site"
uses: actions/[email protected]
with:
name: site
path: "${{ github.workspace }}/docs/build/${{ env.SITE_DIR }}"
deploy_site:
runs-on: [ubuntu-latest]
needs: [build_site]
name: "Deploy GitHub Pages"
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
steps:
- name: Setup Node.js for use with actions
uses: actions/[email protected]
with:
version: 12.x
- name: Checkout
uses: actions/checkout@v2
- name: Download generated site
uses: actions/download-artifact@v1
with:
name: site
path: "${{ github.workspace }}/${{ env.SITE_DIR }}"
- name: Deploy to GitHub Pages
uses: JamesIves/[email protected]
with:
# ACCESS_TOKEN: # optional
GITHUB_TOKEN: "${{ github.token}}"
FOLDER: "${{ env.SITE_DIR }}"
BRANCH: 'gh-pages'
COMMIT_MESSAGE: "[CI] Publish Documentation for ${{ github.sha }}"