-
Notifications
You must be signed in to change notification settings - Fork 3
65 lines (54 loc) · 1.94 KB
/
gh-pages.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
64
65
name: Publish Github Pages
on:
push:
branches:
- dev
release:
types:
- created
defaults:
run:
working-directory: ./docs
jobs:
deploy:
runs-on: ubuntu-20.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v2
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Fetch Latest Release Version
id: get_latest_release
if: github.event_name == 'release'
run: |
echo "::set-output name=release::${{ github.event.release.tag_name }}"
- name: Fetch Last Available Release Version
id: get_last_release
if: github.event_name == 'push' || !steps.get_latest_release.outputs.release
run: |
echo "::set-output name=release::$(git describe --tags --abbrev=0)"
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.87.0'
extended: true
- name: Build Documentation - Versioned
run: hugo --minify --baseUrl https://databrickslabs.github.io/delta-oms/${{ steps.get_last_release.outputs.release }}/
- name: Deploy Documentation - Versioned
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/public
publish_branch: public_docs
destination_dir: ${{ steps.get_last_release.outputs.release }}
- name: Build Documentation - Latest
run: hugo --minify --baseUrl https://databrickslabs.github.io/delta-oms/latest/
- name: Deploy Documentation - Latest
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/public
publish_branch: public_docs
destination_dir: latest