mirror of
https://github.com/nubenetes/awesome-kubernetes.git
synced 2026-07-12 18:00:37 +00:00
Bumps the action-updates group with 3 updates: [actions/checkout](https://github.com/actions/checkout), [actions/cache](https://github.com/actions/cache) and [peter-evans/repository-dispatch](https://github.com/peter-evans/repository-dispatch). Updates `actions/checkout` from 6 to 7 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v6...v7) Updates `actions/cache` from 5 to 6 - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v5...v6) Updates `peter-evans/repository-dispatch` from 3 to 4 - [Release notes](https://github.com/peter-evans/repository-dispatch/releases) - [Commits](https://github.com/peter-evans/repository-dispatch/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major dependency-group: action-updates - dependency-name: actions/cache dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major dependency-group: action-updates - dependency-name: peter-evans/repository-dispatch dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major dependency-group: action-updates ... Signed-off-by: dependabot[bot] <support@github.com>
96 lines
2.9 KiB
YAML
96 lines
2.9 KiB
YAML
name: 06.1. Final Portal Deploy
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
workflow_dispatch: {}
|
|
|
|
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
|
permissions:
|
|
contents: write
|
|
pages: write
|
|
id-token: write
|
|
|
|
# Allow only one concurrent deployment
|
|
concurrency:
|
|
group: "pages-stable"
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
build:
|
|
name: Build Dual Versions
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout master
|
|
uses: actions/checkout@v7
|
|
with:
|
|
submodules: true
|
|
# Full history so mkdocs-git-revision-date-localized can compute the
|
|
# real per-page "last updated" date (shallow clone => all build-date).
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: '3.11'
|
|
cache: 'pip'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
pip install mkdocs-material mkdocs-redirects mkdocs-minify-plugin pymdown-extensions
|
|
pip install -r requirements.txt
|
|
|
|
# 1. Build V1 to temporary staging area
|
|
- name: Build V1 Edition (Staging)
|
|
run: mkdocs build -f mkdocs.yml -d site_v1/
|
|
|
|
# 2. Build V2 Elite Edition (Staging)
|
|
- name: Build V2 Elite Edition (Staging)
|
|
run: mkdocs build -f v2-mkdocs.yml -d site_v2/
|
|
|
|
# 3. Assemble Final Site (V2 at Root with V1 Fallback, V1 Archive at /v1/)
|
|
- name: Assemble Final Site
|
|
run: |
|
|
mkdir -p site/
|
|
|
|
# Safety check: V2 must have a valid index.html and at least 50 pages
|
|
V2_PAGE_COUNT=$(find site_v2/ -name "*.html" | wc -l)
|
|
if [ "$V2_PAGE_COUNT" -lt 50 ] || [ ! -f site_v2/index.html ]; then
|
|
echo "❌ V2 build looks broken (only $V2_PAGE_COUNT HTML pages). Deploying V1 only to protect the site."
|
|
cp -r site_v1/* site/
|
|
mkdir -p site/v1/
|
|
cp -r site_v1/* site/v1/
|
|
rm -rf site_v1/ site_v2/
|
|
exit 0
|
|
fi
|
|
|
|
echo "✅ V2 build OK ($V2_PAGE_COUNT pages). Assembling dual-version site."
|
|
# Copy V1 to root as fallback for any pages not present in V2
|
|
cp -r site_v1/* site/
|
|
# Overwrite root with V2 Elite Portal (matching pages will be V2 versions)
|
|
cp -r site_v2/* site/
|
|
# Deploy full V1 Archive to subdirectory /v1/
|
|
mkdir -p site/v1/
|
|
cp -r site_v1/* site/v1/
|
|
rm -rf site_v1/ site_v2/
|
|
|
|
- name: Setup Pages
|
|
uses: actions/configure-pages@v6
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-pages-artifact@v5
|
|
with:
|
|
path: './site'
|
|
|
|
deploy:
|
|
name: Deploy to GitHub Pages
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
steps:
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v5
|