Skip to content

Commit

Permalink
Use empty dir as default checkout path (#344)
Browse files Browse the repository at this point in the history
  • Loading branch information
minottic authored Oct 30, 2024
1 parent 4a25889 commit 10683a9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/actions/mkdocs-pages/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,21 @@ inputs:
path:
description: relative path under $GITHUB_WORKSPACE to checkout root
type: string
default: docs
default: ''

runs:
using: composite
steps:
- name: Checkout CI
- if: ${{ inputs.path }}
name: Checkout CI
uses: actions/checkout@v4
with:
sparse-checkout: .github
- name: Checkout root
uses: actions/checkout@v4
with:
path: ${{ inputs.path }}
sparse-checkout: .
sparse-checkout: ${{ inputs.path && '.' || '' }}
- name: Set up Python
uses: actions/setup-python@v5
with:
Expand All @@ -55,7 +56,8 @@ runs:
PUSH=${{ inputs.push }}
mike deploy -F ${DOCS_CONFIG} ${PUSH:+--push} \
--update-aliases ${VERSION:-main} ${VERSION:+latest}
mike set-default -F ${DOCS_CONFIG} --push latest
mike set-default -F ${DOCS_CONFIG} --push latest ||
mike set-default -F ${DOCS_CONFIG} --push main
env:
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
GIT_COMMITTER_NAME: ci-bot
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/compose_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCS_LINK_CHECK: true
TAG: ${{ github.sha }}
path: docs
test:
runs-on: ubuntu-latest
needs:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/mkdocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ jobs:
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
push: true
path: docs

0 comments on commit 10683a9

Please sign in to comment.