-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
publish yardoc pages to gh-pages (#765)
publish yardoc pages to gh-pages on every commit to master.
- Loading branch information
Showing
3 changed files
with
43 additions
and
1 deletion.
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,38 @@ | ||
name: Publish yarndoc | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Ruby using Bundler | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.0' | ||
|
||
- name: install gems | ||
run: bundle install && gem install yard | ||
|
||
- name: generate documentation | ||
run: yardoc --output-dir /tmp/docs/ | ||
|
||
- name: save docs and publish | ||
run: | | ||
git clone https://${{ secrets.OSC_ROBOT_GH_PUB_REPO_TOKEN }}@github.com/osc/ood_core.git /tmp/core | ||
git config --global user.name "${{ secrets.OSC_ROBOT_GH_USER }}" | ||
git config --global user.email "${{ secrets.OSC_ROBOT_GH_USER_EMAIL }}" | ||
cd /tmp/core | ||
git checkout gh-pages | ||
rm -rf docs/ | ||
mv /tmp/docs . | ||
git add docs/ | ||
git commit -m 'new docs' | ||
git push | ||
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 |
---|---|---|
|
@@ -50,4 +50,8 @@ Gemfile.lock | |
.rvmrc | ||
|
||
# SSHFS temp files | ||
._* | ||
._* | ||
|
||
# docs are only held in the gh-pages branch | ||
/docs/* | ||
!/docs/.keep |
Empty file.