Add doc build workflows
This commit is contained in:
		
							parent
							
								
									329119b716
								
							
						
					
					
						commit
						01ceb98da1
					
				|  | @ -0,0 +1,25 @@ | ||||||
|  | name: Build documentation | ||||||
|  | 
 | ||||||
|  | on: | ||||||
|  |   push: | ||||||
|  |     branches: | ||||||
|  |       - main | ||||||
|  |       - doc-builder* | ||||||
|  |       - v*-release | ||||||
|  |       - use_templates | ||||||
|  |     paths: | ||||||
|  |       - 'docs/source/**' | ||||||
|  |       - 'assets/**' | ||||||
|  |       - '.github/workflows/doc-build.yml' | ||||||
|  | 
 | ||||||
|  | jobs: | ||||||
|  |    build: | ||||||
|  |     uses: huggingface/doc-builder/.github/workflows/build_main_documentation.yml@main | ||||||
|  |     with: | ||||||
|  |       commit_sha: ${{ github.sha }} | ||||||
|  |       package: smolagents | ||||||
|  |       languages: en | ||||||
|  |       # additional_args: --not_python_module # use this arg if repository is documentation only | ||||||
|  |     secrets: | ||||||
|  |       token: ${{ secrets.HUGGINGFACE_PUSH }} | ||||||
|  |       hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }} | ||||||
|  | @ -0,0 +1,22 @@ | ||||||
|  | name: Build PR Documentation | ||||||
|  | 
 | ||||||
|  | on: | ||||||
|  |   pull_request: | ||||||
|  |     paths: | ||||||
|  |       - 'docs/source/**' | ||||||
|  |       - 'assets/**' | ||||||
|  |       - '.github/workflows/doc-pr-build.yml' | ||||||
|  | 
 | ||||||
|  | concurrency: | ||||||
|  |   group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||||||
|  |   cancel-in-progress: true | ||||||
|  | 
 | ||||||
|  | jobs: | ||||||
|  |   build: | ||||||
|  |     uses: huggingface/doc-builder/.github/workflows/build_pr_documentation.yml@main | ||||||
|  |     with: | ||||||
|  |       commit_sha: ${{ github.event.pull_request.head.sha }} | ||||||
|  |       pr_number: ${{ github.event.number }} | ||||||
|  |       package: smolagents | ||||||
|  |       languages: en | ||||||
|  |       # additional_args: --not_python_module # use this arg if repository is documentation only | ||||||
|  | @ -0,0 +1,16 @@ | ||||||
|  | name: Upload PR Documentation | ||||||
|  | 
 | ||||||
|  | on: | ||||||
|  |   workflow_run: | ||||||
|  |     workflows: ["Build PR Documentation"] | ||||||
|  |     types: | ||||||
|  |       - completed | ||||||
|  | 
 | ||||||
|  | jobs: | ||||||
|  |   build: | ||||||
|  |     uses: huggingface/doc-builder/.github/workflows/upload_pr_documentation.yml@main | ||||||
|  |     with: | ||||||
|  |       package_name: smolagents | ||||||
|  |     secrets: | ||||||
|  |       hf_token: ${{ secrets.HF_DOC_BUILD_PUSH }} | ||||||
|  |       comment_bot_token: ${{ secrets.COMMENT_BOT_TOKEN }} | ||||||
		Loading…
	
		Reference in New Issue