-
-
Notifications
You must be signed in to change notification settings - Fork 46
52 lines (47 loc) · 1.37 KB
/
docs.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
name: Publish Docs
on:
push:
paths:
- docs/**
- src/**
- mkdocs.yml
branches: [main]
# Allow manual trigger (workflow_dispatch)
workflow_dispatch:
jobs:
get_cache_key:
runs-on: ubuntu-latest
outputs:
cache_key: ${{ steps.set_cache_key.outputs.cache_key }}
steps:
- name: Set cache key
id: set_cache_key
run: echo "cache_key=docs-build-$(date --utc '+%V')" >> $GITHUB_OUTPUT
build_doxygen:
uses: hotosm/gh-workflows/.github/workflows/doxygen_build.yml@main
needs: [get_cache_key]
with:
cache_paths: |
docs/apidocs
cache_key: ${{ needs.get_cache_key.outputs.cache_key }}
build_openapi_json:
uses: hotosm/gh-workflows/.github/workflows/openapi_build.yml@main
needs: [get_cache_key]
with:
image: ghcr.io/hotosm/fmtm/backend:ci-${{ github.ref_name }}
example_env_file_path: ".env.example"
cache_paths: |
docs/openapi.json
cache_key: ${{ needs.get_cache_key.outputs.cache_key }}
publish_docs:
uses: hotosm/gh-workflows/.github/workflows/mkdocs_build.yml@main
needs:
- get_cache_key
- build_doxygen
- build_openapi_json
with:
image: ghcr.io/hotosm/fmtm/backend:ci-${{ github.ref_name }}
cache_paths: |
docs/apidocs
docs/openapi.json
cache_key: ${{ needs.get_cache_key.outputs.cache_key }}