-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (46 loc) · 1.28 KB
/
documentation.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
name: Doc on GitHub Pages
on:
push:
branches:
- main # Set a branch to deploy
pull_request:
jobs:
# JOB to run change detection
changes:
runs-on: ubuntu-latest
# Set job outputs to values from filter step
outputs:
deploy: ${{ steps.filter.outputs.deploy }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
deploy:
- 'docs/**'
- 'project-documentation/**'
deploy:
needs: changes
if: |
${{ needs.changes.outputs.deploy == 'true' }} &&
${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Build
run: make doc-generate
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./published-documentation