Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

publish yardoc pages to gh-pages #765

Merged
merged 10 commits into from
Aug 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/publish_yarndoc.yml
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

6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,8 @@ Gemfile.lock
.rvmrc

# SSHFS temp files
._*
._*

# docs are only held in the gh-pages branch
/docs/*
!/docs/.keep
Empty file added docs/.keep
Empty file.