Skip to content

Scheduled regeneration #39756

Scheduled regeneration

Scheduled regeneration #39756

Workflow file for this run

name: Scheduled regeneration
on:
push:
branches:
- master
pull_request:
schedule:
# Once every hour
- cron: "30 * * * *"
workflow_dispatch:
concurrency:
group: scheduled-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true
jobs:
generate:
if: startsWith( github.repository, 'Homebrew/' )
name: Generate and build documentation site
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Set up Git repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
persist-credentials: false
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@540484a3c0f308b08619664ec40bf6c371d172c3 # v1.205.0
with:
bundler-cache: true
- name: Generate site
run: |
ln -s "$(brew --repo)" brew
bundle exec rake yard build
- name: Upload pages artifact
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
deploy:
needs: generate
if: ${{ github.ref_name == 'master' }}
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
outputs:
deploy_url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
deploy-issue:
name: Open/close deploy issue
needs: [generate, deploy]
if: ${{ always() && github.ref_name == 'master' }}
env:
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
issues: write # for Homebrew/actions/create-or-update-issue
steps:
- name: Open, update, or close deploy issue
uses: Homebrew/actions/create-or-update-issue@master
with:
token: ${{ github.token }}
repository: ${{ github.repository }}
title: rubydoc.brew.sh deployment failed!
body: The most recent [rubydoc.brew.sh deployment failed](${{ env.RUN_URL }}).
labels: deploy failure
update-existing: ${{ contains(needs.*.result, 'failure') }}
close-existing: ${{ needs.deploy.result == 'success' }}
close-from-author: github-actions[bot]
close-comment: The most recent [rubydoc.brew.sh deployment succeeded](${{ env.RUN_URL }}). Closing issue.