Merge pull request #17468 from Homebrew/docs_ci_tweaks
This commit is contained in:
		
						commit
						a5ce9e9559
					
				
							
								
								
									
										30
									
								
								.github/workflows/docs.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										30
									
								
								.github/workflows/docs.yml
									
									
									
									
										vendored
									
									
								
							@ -18,7 +18,6 @@ env:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
jobs:
 | 
					jobs:
 | 
				
			||||||
  docs:
 | 
					  docs:
 | 
				
			||||||
    if: github.repository == 'Homebrew/brew'
 | 
					 | 
				
			||||||
    runs-on: ubuntu-22.04
 | 
					    runs-on: ubuntu-22.04
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - name: Set up Homebrew
 | 
					      - name: Set up Homebrew
 | 
				
			||||||
@ -29,13 +28,16 @@ jobs:
 | 
				
			|||||||
          cask: false
 | 
					          cask: false
 | 
				
			||||||
          test-bot: false
 | 
					          test-bot: false
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      - name: Checkout repository
 | 
				
			||||||
 | 
					        uses: actions/checkout@v4
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Install vale
 | 
					      - name: Install vale
 | 
				
			||||||
        run: brew install vale
 | 
					        run: brew install vale
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Lint docs
 | 
					      - name: Cleanup Homebrew/brew docs
 | 
				
			||||||
        working-directory: ${{ steps.set-up-homebrew.outputs.repository-path }}
 | 
					        if: github.repository == 'Homebrew/brew'
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
          set -euo pipefail
 | 
					          set -xeuo pipefail
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          # Avoid failing on broken symlinks.
 | 
					          # Avoid failing on broken symlinks.
 | 
				
			||||||
          rm Library/Homebrew/os/mac/pkgconfig/fuse/fuse.pc
 | 
					          rm Library/Homebrew/os/mac/pkgconfig/fuse/fuse.pc
 | 
				
			||||||
@ -44,26 +46,24 @@ jobs:
 | 
				
			|||||||
          # No ignore support (https://github.com/errata-ai/vale/issues/131).
 | 
					          # No ignore support (https://github.com/errata-ai/vale/issues/131).
 | 
				
			||||||
          rm -r Library/Homebrew/vendor
 | 
					          rm -r Library/Homebrew/vendor
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          vale .
 | 
					      - name: Run Vale
 | 
				
			||||||
 | 
					        run: vale docs/
 | 
				
			||||||
          # Restore removed files.
 | 
					 | 
				
			||||||
          git reset --hard
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Install Ruby
 | 
					      - name: Install Ruby
 | 
				
			||||||
        uses: ruby/setup-ruby@78c01b705fd9d5ad960d432d3a0cfa341d50e410 # v1.179.1
 | 
					        uses: ruby/setup-ruby@78c01b705fd9d5ad960d432d3a0cfa341d50e410 # v1.179.1
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          bundler-cache: true
 | 
					          bundler-cache: true
 | 
				
			||||||
          working-directory: ${{ steps.set-up-homebrew.outputs.repository-path }}/docs
 | 
					          working-directory: docs
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Check Markdown syntax
 | 
					      - name: Check Markdown syntax
 | 
				
			||||||
        working-directory: ${{ steps.set-up-homebrew.outputs.repository-path }}/docs
 | 
					        working-directory: docs
 | 
				
			||||||
        run: bundle exec rake lint
 | 
					        run: bundle exec rake lint
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Check code blocks conform to our Ruby style guide
 | 
					      - name: Check code blocks conform to our Ruby style guide
 | 
				
			||||||
        working-directory: ${{ steps.set-up-homebrew.outputs.repository-path }}/docs
 | 
					        run: brew style docs
 | 
				
			||||||
        run: brew style .
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: Build the site and check for broken links
 | 
					      - name: Build the site and check for broken links
 | 
				
			||||||
        working-directory: ${{ steps.set-up-homebrew.outputs.repository-path }}/docs
 | 
					        working-directory: docs
 | 
				
			||||||
        run: |
 | 
					        run: bundle exec rake test
 | 
				
			||||||
          bundle exec rake test
 | 
					        env:
 | 
				
			||||||
 | 
					          JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user