Skip to content

Commit

Permalink
Merge pull request linkml#112 from linkml/issue-2029
Browse files Browse the repository at this point in the history
GitHub Action workflow to preview documentation changes in PRs
  • Loading branch information
sujaypatil96 authored Jun 17, 2024
2 parents c818519 + a0dc222 commit 4e062ec
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Preview {{cookiecutter.__project_slug}} documentation build

on:
pull_request:
types:
- opened
- reopened
- synchronize

concurrency: preview-${{ github.ref }}

jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python 3
uses: actions/setup-python@v4
with:
python-version: 3.9

- name: Install Poetry
run: pipx install poetry

- name: Install dependencies
run: poetry install -E docs

- name: Build documentation
run: |
mkdir -p site
touch site/.nojekyll
make gendoc
([ ! -f docs/about.md ] && cp src/docs/about.md docs/) || true
poetry run mkdocs build -d site
- name: Deploy preview
uses: rossjrw/pr-preview-action@v1
with:
source-dir: site/
preview-branch: gh-pages

0 comments on commit 4e062ec

Please sign in to comment.