-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Add GitHub Pages deployment workflow
- Loading branch information
1 parent
6efed93
commit ff29fd5
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Deploy Yard to GitHub Pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
- 'github-pages-doc' | ||
workflow_dispatch: | ||
|
||
permissions: | ||
pages: write # Allow writing to the GitHub Pages | ||
id-token: write # Allow OIDC token to be issued | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler-cache: true | ||
|
||
- name: Generate Yard documentation | ||
run: | | ||
bundle exec yard doc | ||
- name: Upload artifact to GitHub Pages | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: doc # Path to the folder containing the Yard documentation (default is 'doc') | ||
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
needs: build # The deploy job will only run if the build job is successful | ||
|
||
steps: | ||
- name: Deploy to GitHub Pages | ||
uses: actions/deploy-pages@v4 |