mirror of
https://github.com/nubenetes/awesome-kubernetes.git
synced 2026-05-28 12:04:42 +00:00
67 lines
1.4 KiB
YAML
67 lines
1.4 KiB
YAML
name: Publish docs via GitHub Pages
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
# Allow only one concurrent deployment
|
|
concurrency:
|
|
group: "pages"
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
build:
|
|
name: Build Dual Versions
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout master
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
cache: 'pip'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
pip install -r requirements.txt
|
|
|
|
# 1. Build V1 (Root)
|
|
- name: Build V1 Edition
|
|
run: mkdocs build -f mkdocs.yml -d site/
|
|
|
|
# 2. Build V2 (Subdirectory)
|
|
- name: Build V2 Elite Edition
|
|
run: mkdocs build -f v2-mkdocs.yml -d site/v2/
|
|
|
|
- name: Setup Pages
|
|
uses: actions/configure-pages@v4
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-pages-artifact@v3
|
|
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@v4
|
|
|
|
|