Skip to content

Commit b29e0dd

Browse files
authored
Merge pull request #26 from sphinx-notes/feat/chekcout-options
Add checkout options
2 parents 9845920 + 9d55db6 commit b29e0dd

File tree

2 files changed

+32
-6
lines changed

2 files changed

+32
-6
lines changed

README.rst

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,21 @@ __ https://docs.github.com/en/pages/getting-started-with-github-pages/configurin
4444
Inputs
4545
======
4646

47-
========================== ============================ ======== ==============================================
47+
========================== ============================ ======== =================================================
4848
Input Default Required Description
49-
-------------------------- ---------------------------- -------- ----------------------------------------------
49+
-------------------------- ---------------------------- -------- -------------------------------------------------
5050
``documentation_path`` ``./docs`` false Path to Sphinx source files
5151
``requirements_path`` ``./docs/requirements.txt`` false Path to to requirements file,
5252
used in ``pip install -r XXX`` command
5353
``pyproject_extras`` ``docs`` false Extras of `Requirement Specifier`__
5454
used in ``pip install .[XXX]``
5555
``python_version`` ``3.10`` false Version of Python
5656
``sphinx_version`` ``5.3`` false Version of Sphinx
57-
``sphinx_build_options`` ```` false Additional options passed to ``sphinx-build``
57+
``sphinx_build_options`` false Additional options passed to ``sphinx-build``
5858
``cache`` ``false`` false Enable cache to speed up documentation building
59-
========================== ============================ ======== ===============================================
59+
``checkout`` ``true`` false Whether to automatically checkout the repository,
60+
if false, user need to do it byself
61+
========================== ============================ ======== =================================================
6062

6163
__ https://pip.pypa.io/en/stable/reference/requirement-specifiers/#overview
6264

@@ -119,3 +121,23 @@ For non-python dependencies, add a step to your workflow file, and install them
119121
(such as apt, wget, ...). See `#24`__ for example.
120122

121123
__ https://github.com/sphinx-notes/pages/issues/24
124+
125+
Customize checkout options
126+
**************************
127+
128+
Repository is automatically checkout by default, but some user may need to customize checkout options
129+
(For example, checkout private repository, checkout multiple repositories).
130+
For this case, user can set the ``checkout`` options to ``false``, then use `action/checkout`__ byeself.
131+
132+
.. code:: yaml
133+
134+
steps:
135+
- uses: actions/checkout@master
136+
with:
137+
YOUR_CUSTOM_OPTIONS: ...
138+
- id: deployment
139+
uses: sphinx-notes/pages@v3
140+
with:
141+
checkout: false
142+
143+
__ https://github.com/actions/checkout

action.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ inputs:
3434
description: 'Additional options passed to sphinx-build'
3535
required: false
3636
default: ''
37+
checkout:
38+
description: 'Whether to automatically checkout the repository, if false, user need to do it byself'
39+
required: false
40+
default: true
3741
outputs:
3842
page_url:
3943
description: 'URL to deployed GitHub Pages'
@@ -44,12 +48,12 @@ runs:
4448
steps:
4549
- name: Checkout
4650
uses: actions/checkout@v3
47-
if: ${{ inputs.cache == 'true' }}
51+
if: ${{ inputs.chekcout == 'true' && inputs.cache == 'true' }}
4852
with:
4953
fetch-depth: 0 # Required by git-restore-mtime
5054
- name: Checkout
5155
uses: actions/checkout@v3
52-
if: ${{ inputs.cache == 'false' }}
56+
if: ${{ inputs.chekcout == 'true' && inputs.cache == 'false' }}
5357

5458
- name: Setup python
5559
uses: actions/setup-python@v4

0 commit comments

Comments
 (0)