mirror of
				https://github.com/privacyguides/i18n.git
				synced 2025-10-31 13:46:34 +00:00 
			
		
		
		
	Update test build workflow
This commit is contained in:
		
							
								
								
									
										78
									
								
								.github/workflows/site-build.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										78
									
								
								.github/workflows/site-build.yml
									
									
									
									
										vendored
									
									
								
							| @@ -25,58 +25,36 @@ on: | ||||
|   schedule: | ||||
|     - cron: '0 17 * * *' | ||||
|  | ||||
| permissions: | ||||
|   contents: read | ||||
|  | ||||
| jobs: | ||||
|   build: | ||||
|   submodule: | ||||
|     strategy: | ||||
|       fail-fast: false | ||||
|       matrix: | ||||
|         language: [es, fr, he, it, nl, ru, zh-Hant] | ||||
|         repo: [mkdocs-material-insiders, brand, i18n] | ||||
|     uses: privacyguides/privacyguides.org/.github/workflows/download-repo.yml@main | ||||
|     with: | ||||
|       repo: ${{ matrix.repo }} | ||||
|     secrets: | ||||
|       ACTIONS_SSH_KEY: ${{ secrets.ACTIONS_SSH_KEY }} | ||||
|  | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
|       - name: Checkout website | ||||
|         uses: actions/checkout@v3 | ||||
|         with: | ||||
|           repository: 'privacyguides/privacyguides.org' | ||||
|           fetch-depth: '0' | ||||
|           ssh-key: ${{ secrets.ACTIONS_SSH_KEY }} | ||||
|           submodules: 'true' | ||||
|        | ||||
|       - name: Checkout translations | ||||
|         uses: actions/checkout@v3 | ||||
|         with: | ||||
|           path: 'i18n-download' | ||||
|        | ||||
|       - name: Move translations to site | ||||
|         run: | | ||||
|           cp -rl i18n-download/i18n . | ||||
|           cp -rl i18n-download/includes . | ||||
|           cp -rl i18n-download/theme . | ||||
|   build: | ||||
|     needs: submodule | ||||
|     strategy: | ||||
|       matrix: | ||||
|         lang: [es, fr, he, it, nl, ru, zh-Hant] | ||||
|       fail-fast: false | ||||
|     permissions: | ||||
|       contents: read | ||||
|     uses: privacyguides/privacyguides.org/.github/workflows/build.yml@main | ||||
|     with: | ||||
|       ref: main | ||||
|       repo: 'privacyguides/privacyguides.org' | ||||
|       lang: ${{ matrix.lang }} | ||||
|       continue-on-error: true | ||||
|  | ||||
|       - name: Python setup | ||||
|         uses: actions/setup-python@v4 | ||||
|         id: py38 | ||||
|         with: | ||||
|           python-version: '3.8' | ||||
|           cache: 'pipenv' | ||||
|  | ||||
|       - name: Install dependencies | ||||
|         run: | | ||||
|           pip install pipenv | ||||
|           pipenv install | ||||
|           sudo apt install pngquant | ||||
|           echo '${{ steps.py38.outputs.cache-hit }}' | ||||
|  | ||||
|       - name: Build website | ||||
|         env: | ||||
|           GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||
|           CARDS: true | ||||
|         run: | | ||||
|           pipenv run mkdocs build --strict --config-file config/mkdocs.${{ matrix.language }}.yml | ||||
|           pipenv run mkdocs --version | ||||
|  | ||||
|       - name: Package website | ||||
|         uses: actions/upload-artifact@v3 | ||||
|         with: | ||||
|           name: ${{ matrix.language }} | ||||
|           path: site/${{ matrix.language }} | ||||
|   cleanup: | ||||
|     if: ${{ always() }} | ||||
|     needs: build | ||||
|     uses: privacyguides/privacyguides.org/.github/workflows/cleanup.yml@main | ||||
|   | ||||
		Reference in New Issue
	
	Block a user