Skip to content

Commit

Permalink
ci: fix docs workflow using cache
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Sep 28, 2023
1 parent 7d1fa3a commit 56810a2
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,22 @@ on:
# Allow manual trigger (workflow_dispatch)
workflow_dispatch:

permissions:
contents: write

jobs:
get_cache_key:
runs-on: ubuntu-latest
outputs:
cache_key: ${{ steps.set_cache_key.outputs.cache_key }}
steps:
- run: echo "cache_key=docs-build-$(date --utc '+%V')" >> $GITHUB_ENV
- 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
with:
cache_paths: |
docs/apidocs
cache_key: ${{ env.cache_key }}
cache_key: ${{ steps.get_cache_key.outputs.cache_key }}

build_openapi_json:
uses: hotosm/gh-workflows/.github/workflows/openapi_build.yml@main
Expand All @@ -33,7 +34,7 @@ jobs:
example_env_file_path: ".env.example"
cache_paths: |
docs/openapi.json
cache_key: ${{ env.cache_key }}
cache_key: ${{ steps.get_cache_key.outputs.cache_key }}

publish_docs:
uses: hotosm/gh-workflows/.github/workflows/mkdocs_build.yml@main
Expand All @@ -42,4 +43,4 @@ jobs:
cache_paths: |
docs/apidocs
docs/openapi.json
cache_key: ${{ env.cache_key }}
cache_key: ${{ steps.get_cache_key.outputs.cache_key }}

0 comments on commit 56810a2

Please sign in to comment.