-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- only attempted scheduled job on `push` (where secrets are around) - use more Homebrew actions - fix `pull_request: []` warning - use `@main` actions
- Loading branch information
1 parent
acd6589
commit 14b625d
Showing
2 changed files
with
25 additions
and
14 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
name: Scheduled regeneration | ||
on: | ||
pull_request: | ||
push: | ||
paths: | ||
- .github/workflows/scheduled.yml | ||
schedule: | ||
|
@@ -12,10 +12,17 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Git repository | ||
uses: actions/checkout@master | ||
uses: actions/checkout@main | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
|
||
- name: Set up Homebrew | ||
id: set-up-homebrew | ||
uses: Homebrew/actions/setup-homebrew@master | ||
|
||
- name: Set up Ruby | ||
uses: actions/setup-ruby@v1 | ||
uses: actions/setup-ruby@main | ||
with: | ||
ruby-version: '2.6' | ||
|
||
|
@@ -24,18 +31,22 @@ jobs: | |
gem install bundler -v "~>1" | ||
bundle install --jobs 4 --retry 3 | ||
- name: Configure Git user | ||
uses: Homebrew/actions/git-user-config@master | ||
with: | ||
username: BrewTestBot | ||
|
||
- name: Generate site | ||
run: | | ||
git clone --depth=1 https://github.com/Homebrew/brew | ||
bundle exec rake yard build | ||
git checkout -b master | ||
# commit and push generated files | ||
git add docs | ||
ln -s $(brew --repo) brew | ||
bundle exec rake yard build | ||
if ! git diff --no-patch --exit-code HEAD -- docs; then | ||
git config --global user.name "BrewTestBot" | ||
git config --global user.email "[email protected]" | ||
git add docs | ||
git commit -m "docs: updates from Homebrew/brew" docs | ||
git pull --rebase origin master | ||
git push | ||
fi | ||
- name: Push commits | ||
uses: Homebrew/actions/git-try-push@master |
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