mirror of
				https://github.com/privacyguides/privacyguides.org.git
				synced 2025-10-31 03:26:35 +00:00 
			
		
		
		
	refactor: Move videos to Ghost (#3115)
This commit is contained in:
		
							
								
								
									
										17
									
								
								.github/workflows/build-pr.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										17
									
								
								.github/workflows/build-pr.yml
									
									
									
									
										vendored
									
									
								
							| @@ -101,24 +101,13 @@ jobs: | ||||
|       continue-on-error: true | ||||
|       privileged: ${{ fromJSON(needs.metadata.outputs.privileged) }} | ||||
|  | ||||
|   build_videos: | ||||
|     if: ${{ contains(github.event.pull_request.labels.*.name, 'ci:build videos') }} | ||||
|     needs: [submodule, metadata] | ||||
|     uses: ./.github/workflows/build-videos.yml | ||||
|     with: | ||||
|       ref: ${{github.event.pull_request.head.ref}} | ||||
|       repo: ${{github.event.pull_request.head.repo.full_name}} | ||||
|       continue-on-error: true | ||||
|       privileged: ${{ fromJSON(needs.metadata.outputs.privileged) }} | ||||
|  | ||||
|   combine_build: | ||||
|     needs: [build_english, build_i18n, build_blog, build_videos] | ||||
|     needs: [build_english, build_i18n, build_blog] | ||||
|     if: | | ||||
|       (always() && !cancelled() && !failure()) && | ||||
|       needs.build_english.result == 'success' && | ||||
|       (needs.build_i18n.result == 'success' || needs.build_i18n.result == 'skipped') && | ||||
|       (needs.build_blog.result == 'success' || needs.build_blog.result == 'skipped') && | ||||
|       (needs.build_videos.result == 'success' || needs.build_videos.result == 'skipped') | ||||
|       (needs.build_blog.result == 'success' || needs.build_blog.result == 'skipped') | ||||
|  | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
| @@ -140,5 +129,5 @@ jobs: | ||||
|  | ||||
|   cleanup: | ||||
|     if: ${{ always() }} | ||||
|     needs: [build_english, build_i18n, build_blog, build_videos] | ||||
|     needs: [build_english, build_i18n, build_blog] | ||||
|     uses: privacyguides/.github/.github/workflows/cleanup.yml@main | ||||
|   | ||||
							
								
								
									
										116
									
								
								.github/workflows/build-videos.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										116
									
								
								.github/workflows/build-videos.yml
									
									
									
									
										vendored
									
									
								
							| @@ -1,116 +0,0 @@ | ||||
| name: 🛠️ Build Videos | ||||
|  | ||||
| on: | ||||
|   workflow_call: | ||||
|     inputs: | ||||
|       ref: | ||||
|         required: true | ||||
|         type: string | ||||
|       repo: | ||||
|         required: true | ||||
|         type: string | ||||
|       context: | ||||
|         type: string | ||||
|         default: deploy-preview | ||||
|       continue-on-error: | ||||
|         type: boolean | ||||
|         default: true | ||||
|       privileged: | ||||
|         type: boolean | ||||
|         default: true | ||||
|  | ||||
| permissions: | ||||
|   contents: read | ||||
|  | ||||
| jobs: | ||||
|   build: | ||||
|     runs-on: ubuntu-latest | ||||
|     continue-on-error: ${{ inputs.continue-on-error }} | ||||
|     permissions: | ||||
|       contents: read | ||||
|  | ||||
|     steps: | ||||
|       - name: Add GitHub Token to Environment | ||||
|         run: | | ||||
|           echo "GH_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> "$GITHUB_ENV" | ||||
|  | ||||
|       - name: Download Repository | ||||
|         uses: actions/checkout@v4 | ||||
|         with: | ||||
|           repository: ${{ inputs.repo }} | ||||
|           ref: ${{ inputs.ref }} | ||||
|           persist-credentials: "false" | ||||
|           fetch-depth: 0 | ||||
|  | ||||
|       - name: Download Submodules | ||||
|         uses: actions/download-artifact@v4 | ||||
|         with: | ||||
|           pattern: repo-* | ||||
|           path: modules | ||||
|  | ||||
|       - name: Move mkdocs-material-insiders to mkdocs-material | ||||
|         if: inputs.privileged | ||||
|         run: | | ||||
|           rmdir modules/mkdocs-material | ||||
|           mv modules/repo-mkdocs-material-insiders modules/mkdocs-material | ||||
|  | ||||
|       - name: Move brand submodule to theme/assets/brand | ||||
|         run: | | ||||
|           rmdir theme/assets/brand | ||||
|           mv modules/repo-brand theme/assets/brand | ||||
|  | ||||
|       - name: Install Python (pipenv) | ||||
|         if: inputs.privileged | ||||
|         uses: actions/setup-python@v5 | ||||
|         with: | ||||
|           cache: "pipenv" | ||||
|  | ||||
|       - name: Install Python (no pipenv) | ||||
|         if: ${{ !inputs.privileged }} | ||||
|         uses: actions/setup-python@v5 | ||||
|  | ||||
|       - name: Install Python Dependencies | ||||
|         if: inputs.privileged | ||||
|         run: | | ||||
|           pip install pipenv | ||||
|           pipenv install | ||||
|           sudo apt install pngquant | ||||
|  | ||||
|       - name: Install Python Dependencies (Unprivileged) | ||||
|         if: ${{ !inputs.privileged }} | ||||
|         run: | | ||||
|           pip install mkdocs-material mkdocs-rss-plugin mkdocs-glightbox mkdocs-macros-plugin | ||||
|           sudo apt install pngquant | ||||
|  | ||||
|       - name: Set base navigation URLs for production build | ||||
|         if: inputs.context == 'production' | ||||
|         run: | | ||||
|           { | ||||
|             echo "MAIN_SITE_BASE_URL=https://www.privacyguides.org/en/" | ||||
|             echo "MAIN_SITE_ABOUT_URL=https://www.privacyguides.org/en/about/" | ||||
|             echo "MAIN_SITE_RECOMMENDATIONS_URL=https://www.privacyguides.org/en/tools/" | ||||
|             echo "MAIN_SITE_KNOWLEDGE_BASE_URL=https://www.privacyguides.org/en/basics/why-privacy-matters/" | ||||
|             echo "ARTICLES_SITE_BASE_URL=https://www.privacyguides.org/articles/" | ||||
|             echo "VIDEOS_SITE_BASE_URL=https://www.privacyguides.org/videos/" | ||||
|           } >> "$GITHUB_ENV" | ||||
|  | ||||
|       - name: Build Website (Privileged) | ||||
|         if: inputs.privileged | ||||
|         run: | | ||||
|           pipenv run mkdocs build --config-file mkdocs.videos.yml | ||||
|  | ||||
|       - name: Build Website (Unprivileged) | ||||
|         if: ${{ !inputs.privileged }} | ||||
|         run: | | ||||
|           BUILD_INSIDERS=false mkdocs build --config-file mkdocs.videos.yml | ||||
|  | ||||
|       - name: Package Website | ||||
|         run: | | ||||
|           tar -czf site-build-videos.tar.gz site | ||||
|  | ||||
|       - name: Upload Site | ||||
|         uses: actions/upload-artifact@v4 | ||||
|         with: | ||||
|           name: site-build-videos.tar.gz | ||||
|           path: site-build-videos.tar.gz | ||||
|           retention-days: 1 | ||||
							
								
								
									
										16
									
								
								.github/workflows/publish-immediate.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										16
									
								
								.github/workflows/publish-immediate.yml
									
									
									
									
										vendored
									
									
								
							| @@ -27,7 +27,6 @@ on: | ||||
|       - "main" | ||||
|     paths: | ||||
|       - "blog/**" | ||||
|       - "videos/**" | ||||
|  | ||||
| concurrency: | ||||
|   group: release-deployment | ||||
| @@ -61,19 +60,8 @@ jobs: | ||||
|       continue-on-error: false | ||||
|       context: production | ||||
|  | ||||
|   build_videos: | ||||
|     needs: submodule | ||||
|     permissions: | ||||
|       contents: read | ||||
|     uses: ./.github/workflows/build-videos.yml | ||||
|     with: | ||||
|       repo: ${{ github.repository }} | ||||
|       ref: ${{ github.ref }} | ||||
|       continue-on-error: false | ||||
|       context: production | ||||
|  | ||||
|   deploy: | ||||
|     needs: [build_blog, build_videos] | ||||
|     needs: [build_blog] | ||||
|     uses: privacyguides/webserver/.github/workflows/deploy-garage.yml@main | ||||
|     with: | ||||
|       environment: production | ||||
| @@ -83,5 +71,5 @@ jobs: | ||||
|  | ||||
|   cleanup: | ||||
|     if: ${{ always() }} | ||||
|     needs: [build_blog, build_videos] | ||||
|     needs: [build_blog] | ||||
|     uses: privacyguides/.github/.github/workflows/cleanup.yml@main | ||||
|   | ||||
							
								
								
									
										15
									
								
								.github/workflows/publish-release.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										15
									
								
								.github/workflows/publish-release.yml
									
									
									
									
										vendored
									
									
								
							| @@ -77,17 +77,6 @@ jobs: | ||||
|       continue-on-error: false | ||||
|       context: production | ||||
|  | ||||
|   build_videos: | ||||
|     needs: submodule | ||||
|     permissions: | ||||
|       contents: read | ||||
|     uses: ./.github/workflows/build-videos.yml | ||||
|     with: | ||||
|       repo: ${{ github.repository }} | ||||
|       ref: ${{ github.ref }} | ||||
|       continue-on-error: false | ||||
|       context: production | ||||
|  | ||||
|   release: | ||||
|     name: Create release notes | ||||
|     needs: build | ||||
| @@ -109,7 +98,7 @@ jobs: | ||||
|           makeLatest: true | ||||
|  | ||||
|   deploy: | ||||
|     needs: [build, build_blog, build_videos] | ||||
|     needs: [build, build_blog] | ||||
|     uses: privacyguides/webserver/.github/workflows/deploy-all.yml@main | ||||
|     secrets: | ||||
|       NETLIFY_TOKEN: ${{ secrets.NETLIFY_TOKEN }} | ||||
| @@ -126,5 +115,5 @@ jobs: | ||||
|  | ||||
|   cleanup: | ||||
|     if: ${{ always() }} | ||||
|     needs: [build, build_blog, build_videos] | ||||
|     needs: [build, build_blog] | ||||
|     uses: privacyguides/.github/.github/workflows/cleanup.yml@main | ||||
|   | ||||
		Reference in New Issue
	
	Block a user