Skip to content

Commit

Permalink
Run docs build without deploy on PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
shamoon committed Sep 30, 2023
1 parent 56f46ae commit 2ed1738
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/docs-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
tags: [ 'v*.*.*' ]
branches: ['main']
pull_request:
workflow_dispatch:

permissions:
Expand Down Expand Up @@ -40,11 +41,14 @@ jobs:
git checkout gh-pages
git pull origin gh-pages
git checkout main
- name: Mike Deploy for Main
if: github.ref == 'refs/heads/main'
- name: Docs Deploy for Main
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
run: MKINSIDERS=true mike deploy --update --push ${{github.ref_name}}
- name: Mike Deploy for Tags
if: github.ref != 'refs/heads/main'
- name: Docs Deploy for Tags
if: github.event_name != 'pull_request' && github.ref != 'refs/heads/main'
run: MKINSIDERS=true mike deploy --update --push ${{github.ref_name}} latest
- name: Docs Test Build
if: github.event_name == 'pull_request'
run: MKINSIDERS=true mkdocs build
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}

0 comments on commit 2ed1738

Please sign in to comment.