Skip to content

Commit

Permalink
Cache support
Browse files Browse the repository at this point in the history
  • Loading branch information
SilverRainZ committed Nov 30, 2022
1 parent c560a4a commit 119bf7f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.rst
Expand Up @@ -67,6 +67,8 @@ Input Default Required Description
``$repository_path`` to pip
requirements file
``sphinx_version`` ``''`` ``false`` Custom version of Sphinx
``cache`` ``false`` ``false`` Enable cache to speed up
documentation building
======================= ============== ============ =============================

Examples
Expand Down
11 changes: 11 additions & 0 deletions action.yml
Expand Up @@ -30,10 +30,21 @@ inputs:
description: 'Version of Sphinx'
required: false
default: ''
cache:
description: 'Enable cache to speed up documentation building'
required: false
default: false

runs:
using: "composite"
steps:
- uses: actions/cache@v3
if: ${{ inputs.cache == 'true' }}
with:
path: /tmp/sphinxnotes-pages
key: sphinxnotes-pages-${{ runner.os }}-${{ github.run_id }} # https://github.com/actions/cache/blob/main/tips-and-workarounds.md#update-a-cache
restore-keys: |
sphinxnotes-pages-${{ runner.os }}
- run: ${{ github.action_path }}/main.sh
shell: bash
env:
Expand Down

0 comments on commit 119bf7f

Please sign in to comment.