Skip to content

Commit be2991f

Browse files
committed
Add action for deploying docs to GitHub Pages via gh-pages
Since GitHub does not support deploying from any branch other than master or gh-pages, deploy docs/ from main directly to gh-pages.
1 parent 32ea36f commit be2991f

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.github/workflows/deploy-docs.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Deploy documentation to gh-pages
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
build-and-deploy:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout 🛎️
11+
uses: actions/checkout@v2 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly.
12+
with:
13+
persist-credentials: false
14+
15+
- name: Deploy 🚀
16+
uses: JamesIves/github-pages-deploy-action@releases/v3
17+
with:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
BRANCH: gh-pages # The branch the action should deploy to.
20+
FOLDER: docs # The folder the action should deploy.

0 commit comments

Comments
 (0)