Skip to content

Commit

Permalink
Don't try to deploy to GitHub Pages if it's not enabled (#4809)
Browse files Browse the repository at this point in the history
  • Loading branch information
leo60228 authored Jun 25, 2024
1 parent f2e8482 commit 566ad6d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,23 @@ jobs:
run: |
cd docs
mdbook build
- name: Check if Pages is enabled
uses: octokit/[email protected]
id: check_pages
continue-on-error: true
with:
route: GET /repos/{repo}/pages
repo: ${{ github.repository }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Pages
uses: actions/configure-pages@v4
if: steps.check_pages.outcome == 'success'
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'docs/book'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
if: steps.check_pages.outcome == 'success'

0 comments on commit 566ad6d

Please sign in to comment.