Skip to content

Commit

Permalink
Deploy docs to gh-pages on merge (#138)
Browse files Browse the repository at this point in the history
* Add workflow to deploy docs to gh-pages branch

* Fix typos

* Update the triggers so build and deploy runs on merge only

* Overhall triggers again

* Deploy on push to master branch
* Remove check on whether PR Merged since no longer needed
* Separaete docs deploy into separate job that only runs if changes
exist in the docs folder

* Add trigger for pr to test

* Fix typo

* Trying again

* And trying again

* Remove test triggers

* Add PR docs preview workflow

* Make trivial change to docs for testing pr docs review

* Try to fix trigger for docs preview

* Fix paths condition for PR docs preview

* Test removing paths condition

* Try to fix the paths condition

* Revert "Make trivial change to docs for testing pr docs review"

This reverts commit 98885ac.

* Try to fix paths expression again

* Revert "Revert "Make trivial change to docs for testing pr docs review""

This reverts commit 45c2df8.
  • Loading branch information
ezmiller authored Mar 9, 2024
1 parent f68d9bc commit 93c2253
Show file tree
Hide file tree
Showing 8 changed files with 2,626 additions and 5,930 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build and Deploy

on:
push:
branches:
- master
workflow_dispatch:

# This is just a guard against two of these actions
# running at the same time. Not likely an issue for
# us right now, but it could happen.
concurrency: build-and-deploy-${{ github.ref }}

jobs:
deploy-docs:
runs-on: ubuntu-latest

# Only run this job if there were changes in the docs folder
paths:
- ./docs/*

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Deploy documentation
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docs
branch: gh-pages # default for this action, but including to be explicit

27 changes: 27 additions & 0 deletions .github/workflows/prs_doc_preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: PR Docs Preview

on:
pull_request:
paths:
- 'docs/**/*'
types:
- opened
- reopened
- synchronize
- closed

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

jobs:
deploy-docs-preview:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Deploy preview
uses: rossjrw/pr-preview-action@v1
with:
source-dir: ./docs/
preview-branch: gh-pages
Loading

0 comments on commit 93c2253

Please sign in to comment.