Use decimal prefixes for bytes, fix concurrent download progress output edge cases #19229
Workflow file for this run
This file contains hidden or 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
| name: Documentation | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| merge_group: | |
| permissions: | |
| contents: read | |
| pages: read | |
| env: | |
| HOMEBREW_DEVELOPER: 1 | |
| HOMEBREW_NO_AUTO_UPDATE: 1 | |
| HOMEBREW_NO_ENV_HINTS: 1 | |
| HOMEBREW_NO_INSTALL_CLEANUP: 1 | |
| defaults: | |
| run: | |
| shell: bash -xeuo pipefail {0} | |
| jobs: | |
| docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Homebrew | |
| id: set-up-homebrew | |
| uses: Homebrew/actions/setup-homebrew@main | |
| with: | |
| core: false | |
| cask: false | |
| - name: Checkout repository | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Install vale | |
| run: brew install vale | |
| - name: Cleanup Homebrew/brew docs | |
| if: github.repository == 'Homebrew/brew' | |
| run: | | |
| # Avoid failing on broken symlinks. | |
| rm Library/Homebrew/os/mac/pkgconfig/fuse/fuse.pc | |
| rm Library/Homebrew/os/mac/pkgconfig/fuse/osxfuse.pc | |
| # No ignore support (https://github.com/errata-ai/vale/issues/131). | |
| rm -r Library/Homebrew/vendor | |
| - name: Run Vale | |
| run: vale docs/ | |
| - name: Install Ruby | |
| uses: ruby/setup-ruby@d5126b9b3579e429dd52e51e68624dda2e05be25 # v1.267.0 | |
| with: | |
| bundler-cache: true | |
| working-directory: docs | |
| - name: Check Markdown syntax | |
| working-directory: docs | |
| run: bundle exec rake lint | |
| - name: Check code blocks conform to our Ruby style guide | |
| run: brew style docs | |
| - name: Generate formulae.brew.sh API samples | |
| if: github.repository == 'Homebrew/formulae.brew.sh' | |
| working-directory: docs | |
| run: ../script/generate-api-samples.rb --template | |
| - name: Cache HTML Proofer | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 | |
| with: | |
| path: tmp/.htmlproofer | |
| key: ${{ runner.os }}-htmlproofer | |
| - name: Build the site without YARD and check for broken links | |
| working-directory: docs | |
| run: bundle exec rake build test | |
| env: | |
| JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Rebuild the site with YARD | |
| if: github.repository == 'Homebrew/brew' | |
| working-directory: docs | |
| run: bundle exec rake yard build | |
| env: | |
| JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload pages artifact | |
| if: github.repository == 'Homebrew/brew' | |
| uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0 | |
| with: | |
| path: docs/_site/ | |
| deploy: | |
| needs: docs | |
| if: ${{ github.repository == 'Homebrew/brew' && github.ref_name == 'main' }} | |
| 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: [docs, deploy] | |
| if: ${{ github.repository == 'Homebrew/brew' && always() && github.ref_name == 'main' }} | |
| 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@main | |
| with: | |
| token: ${{ github.token }} | |
| repository: ${{ github.repository }} | |
| title: docs.brew.sh deployment failed! | |
| body: The most recent [docs.brew.sh deployment failed](${{ env.RUN_URL }}). | |
| labels: deploy failure | |
| update-existing: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped') }} | |
| close-existing: ${{ needs.deploy.result == 'success' }} | |
| close-from-author: github-actions[bot] | |
| close-comment: The most recent [docs.brew.sh deployment succeeded](${{ env.RUN_URL }}). Closing issue. |