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

workflows: add apidoc workflow for rubydoc.brew.sh #6418

Merged
merged 2 commits into from Sep 4, 2019
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 0 additions & 10 deletions .github/main.workflow

This file was deleted.

36 changes: 0 additions & 36 deletions .github/main.workflow.sh

This file was deleted.

38 changes: 38 additions & 0 deletions .github/workflows/apidoc.yml
@@ -0,0 +1,38 @@
name: Generate rubydoc.brew.sh
on:
push:
branches: master
jobs:
apidoc:
runs-on: ubuntu-latest
steps:
- uses: docker://ruby:latest
- uses: Homebrew/actions/git-ssh@master
with:
git_user: BrewTestBot
git_email: homebrew-test-bot@lists.sfconservancy.org
key: ${{ secrets.RUBYDOC_DEPLOY_KEY }}
- run: |
# silence bundler complaining about being root
mkdir ~/.bundle
echo 'BUNDLE_SILENCE_ROOT_WARNING: "1"' > ~/.bundle/config

# 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
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
6 changes: 3 additions & 3 deletions Library/Homebrew/cmd/uses.rb
@@ -1,12 +1,12 @@
# frozen_string_literal: true

require "formula"
require "cli/parser"

# `brew uses foo bar` returns formulae that use both foo and bar
# If you want the union, run the command twice and concatenate the results.
# The intersection is harder to achieve with shell tools.

require "formula"
require "cli/parser"

module Homebrew
module_function

Expand Down