mirror of
				https://gitea.invidious.io/iv-org/shard-ameba.git
				synced 2024-08-15 00:53:29 +00:00 
			
		
		
		
	Add deploy docs workflow
This commit is contained in:
		
							parent
							
								
									69f3921a68
								
							
						
					
					
						commit
						d20952127a
					
				
					 1 changed files with 54 additions and 0 deletions
				
			
		
							
								
								
									
										54
									
								
								.github/workflows/docs.yml
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										54
									
								
								.github/workflows/docs.yml
									
										
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -0,0 +1,54 @@ | |||
| name: Docs | ||||
| 
 | ||||
| on: | ||||
|   push: | ||||
|     branches: [master] | ||||
| 
 | ||||
| jobs: | ||||
|   build: | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
|       - name: Inject slug/short variables | ||||
|         uses: rlespinasse/github-slug-action@v3.x | ||||
| 
 | ||||
|       - name: Install Crystal | ||||
|         uses: oprypin/install-crystal@v1 | ||||
| 
 | ||||
|       - name: Download source | ||||
|         uses: actions/checkout@v2 | ||||
|         with: | ||||
|           persist-credentials: false | ||||
| 
 | ||||
|       - name: Install dependencies | ||||
|         run: shards install | ||||
|         env: | ||||
|           SHARDS_OPTS: --ignore-crystal-version | ||||
| 
 | ||||
|       - name: Build docs | ||||
|         run: | | ||||
|           sed -i -e 's:<.*>::g' README.md | ||||
|           crystal docs --project-version="${{ env.GITHUB_REF_SLUG }}" --source-refname="${{ env.GITHUB_SHA_SHORT }}" | ||||
| 
 | ||||
|       - name: Upload artifacts | ||||
|         uses: actions/upload-artifact@v2 | ||||
|         with: | ||||
|           name: docs | ||||
|           path: docs | ||||
| 
 | ||||
|   deploy: | ||||
|     needs: build | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
|       - name: Download artifacts | ||||
|         uses: actions/download-artifact@v2 | ||||
|         with: | ||||
|           name: docs | ||||
|           path: docs | ||||
| 
 | ||||
|       - name: Deploy docs 🚀 | ||||
|         uses: JamesIves/github-pages-deploy-action@3.7.1 | ||||
|         with: | ||||
|           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||
|           BRANCH: gh-pages | ||||
|           FOLDER: docs | ||||
|           CLEAN: true | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue