Skip to content

Scheduled regeneration #37707

Scheduled regeneration

Scheduled regeneration #37707

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@d632683dd7b4114ad314bca15554477dd762a938 # 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@c04af2bb7258bb6a03df1d3c1865998ac9390972 # v1.194.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
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
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.