mirror of
https://github.com/gosticks/brew.git
synced 2026-09-08 09:50:34 +00:00
This prevents the action being run in the fork, which will generate errors due to missing token.
42 lines
1.1 KiB
YAML
42 lines
1.1 KiB
YAML
name: Generate rubydoc.brew.sh
|
|
on:
|
|
push:
|
|
branches: master
|
|
jobs:
|
|
apidoc:
|
|
if: github.repository == 'Homebrew/brew'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: Homebrew/actions/git-ssh@master
|
|
with:
|
|
git_user: BrewTestBot
|
|
git_email: homebrew-test-bot@lists.sfconservancy.org
|
|
key: ${{ secrets.RUBYDOC_DEPLOY_KEY }}
|
|
|
|
- name: Set up Ruby
|
|
uses: actions/setup-ruby@v1
|
|
with:
|
|
version: '>=2.3'
|
|
|
|
- name: Build and push API docs
|
|
run: |
|
|
# clone rubydoc.brew.sh with SSH so we can push back
|
|
git clone git@github.com:Homebrew/rubydoc.brew.sh
|
|
cd rubydoc.brew.sh
|
|
|
|
# clone latest Homebrew/brew
|
|
git clone --depth=1 https://github.com/Homebrew/brew
|
|
|
|
# run rake to build documentation
|
|
gem install bundler
|
|
bundle install --jobs 4 --retry 3
|
|
bundle exec rake
|
|
|
|
# commit and push generated files
|
|
git add docs
|
|
|
|
if ! git diff --exit-code HEAD -- docs; then
|
|
git commit -m 'docs: update from Homebrew/brew push' docs
|
|
git push
|
|
fi
|