-
-
Notifications
You must be signed in to change notification settings - Fork 22
58 lines (48 loc) · 1.31 KB
/
scheduled.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Scheduled regeneration
on:
push:
paths:
- .github/workflows/scheduled.yml
schedule:
# Once every hour
- cron: "30 * * * *"
concurrency:
group: scheduled
cancel-in-progress: true
permissions:
contents: write
jobs:
generate:
if: startsWith( github.repository, 'Homebrew/' )
runs-on: ubuntu-22.04
steps:
- name: Set up Git repository
uses: actions/checkout@v4
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: ruby/setup-ruby@v1
with:
ruby-version: "3.1"
bundler-cache: true
- name: Configure Git user
uses: Homebrew/actions/git-user-config@master
with:
username: BrewTestBot
- name: Generate site
run: |
ln -s $(brew --repo) brew
bundle exec rake yard build
- name: Commit changes
run: |
git reset origin/master
git add docs
if ! git diff --no-patch --exit-code HEAD -- docs; then
git commit -m "docs: updates from Homebrew/brew" docs
fi
- name: Push commits
uses: Homebrew/actions/git-try-push@master