mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-11-29 08:51:25 +01:00
Add docs release workflow
This commit is contained in:
parent
b1ccdfed77
commit
c328d67926
44
.github/workflows/docs.yml
vendored
Normal file
44
.github/workflows/docs.yml
vendored
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
name: Release Docs
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- tags
|
||||||
|
paths:
|
||||||
|
- docs/**
|
||||||
|
-
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release_docs:
|
||||||
|
name: Release Docs
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: "3.10"
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: python3 -m pip install -r ./docs/scripts/requirements.txt
|
||||||
|
|
||||||
|
- name: Build site
|
||||||
|
run: |
|
||||||
|
./docs/scripts/copy_docs.sh
|
||||||
|
mkdocs build
|
||||||
|
|
||||||
|
- name: Push site
|
||||||
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
destination_dir: ${{ env.GITHUB_REF_NAME }}
|
||||||
|
publish_dir: ./site
|
||||||
|
|
||||||
|
- name: Push redirect
|
||||||
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
publish_dir: ./docs/redirect
|
||||||
|
keep_files: true]
|
||||||
7
docs/scripts/copy_docs.sh
Executable file
7
docs/scripts/copy_docs.sh
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -eo pipefail
|
||||||
|
|
||||||
|
cp CONTRIBUTING.md code-of-conduct.md ./docs/
|
||||||
|
|
||||||
|
cp LICENSE ./docs/LICENSE.md
|
||||||
3
docs/scripts/index.html.gotmpl
Normal file
3
docs/scripts/index.html.gotmpl
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<head>
|
||||||
|
<meta http-equiv="Refresh" content="0; url='/external-dns/{{.}}/'" />
|
||||||
|
</head>
|
||||||
3
docs/scripts/requirements.txt
Normal file
3
docs/scripts/requirements.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
mkdocs-git-revision-date-localized-plugin == 1.0.0
|
||||||
|
mkdocs == 1.2.3
|
||||||
|
mkdocs-material == 8.2.5
|
||||||
Loading…
x
Reference in New Issue
Block a user