switch to ghactions for docs
This commit is contained in:
parent
fe96fabae1
commit
f719d9c406
56
.drone.yml
56
.drone.yml
@ -120,62 +120,6 @@ volumes:
|
|||||||
- name: dockersock
|
- name: dockersock
|
||||||
temp: {}
|
temp: {}
|
||||||
|
|
||||||
---
|
|
||||||
#########################
|
|
||||||
##### Documentation #####
|
|
||||||
#########################
|
|
||||||
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: docs
|
|
||||||
|
|
||||||
platform:
|
|
||||||
os: linux
|
|
||||||
arch: amd64
|
|
||||||
|
|
||||||
steps:
|
|
||||||
|
|
||||||
- name: build
|
|
||||||
image: python:3.9
|
|
||||||
commands:
|
|
||||||
- python3 -m pip install -r docs/requirements.txt
|
|
||||||
- git config user.name ci-bot
|
|
||||||
- git config user.email ci-bot@k3d.io
|
|
||||||
- mike deploy --update-aliases ${DRONE_TAG} latest
|
|
||||||
- |
|
|
||||||
if [ -z "${DRONE_SEMVER_PRERELEASE}" ] && [ -n "${DRONE_TAG}" ]; then
|
|
||||||
mike alias ${DRONE_TAG} stable
|
|
||||||
mike set-default stable
|
|
||||||
fi
|
|
||||||
when:
|
|
||||||
event:
|
|
||||||
- push
|
|
||||||
- tag
|
|
||||||
|
|
||||||
- name: publish
|
|
||||||
image: plugins/gh-pages
|
|
||||||
settings:
|
|
||||||
password:
|
|
||||||
from_secret: github_token
|
|
||||||
username: rancherio-gh-m
|
|
||||||
pages_directory: site/
|
|
||||||
target_branch: gh-pages
|
|
||||||
when:
|
|
||||||
event:
|
|
||||||
- tag
|
|
||||||
ref:
|
|
||||||
exclude:
|
|
||||||
# exclude tags for pre-releases
|
|
||||||
- "refs/tags/*rc*"
|
|
||||||
- "refs/tags/*beta*"
|
|
||||||
- "refs/tags/*alpha*"
|
|
||||||
- "refs/tags/*test*"
|
|
||||||
- "refs/tags/*dev*"
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
event:
|
|
||||||
- push
|
|
||||||
- tag
|
|
||||||
|
|
||||||
---
|
---
|
||||||
###########################
|
###########################
|
||||||
|
47
.github/workflows/docs.yml
vendored
Normal file
47
.github/workflows/docs.yml
vendored
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
name: k3d.io
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
tags:
|
||||||
|
# only run on tags for real releases and special docs releases
|
||||||
|
- 'v[0-9]+.[0-9]+.[0-9]+'
|
||||||
|
- 'v[0-9]+.[0-9]+.[0-9]+-docs.[0-9]+'
|
||||||
|
# tags-ignore:
|
||||||
|
# - "*rc*"
|
||||||
|
# - "*beta*"
|
||||||
|
# - "*alpha*"
|
||||||
|
# - "*test*"
|
||||||
|
# - "*dev*"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
container:
|
||||||
|
image: python:3.9
|
||||||
|
steps:
|
||||||
|
- name: Checkout Project
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Install Requirements
|
||||||
|
run: pip install -r docs/requirements.txt
|
||||||
|
- name: Build with MkDocs (validation)
|
||||||
|
run: |
|
||||||
|
rm -r site/
|
||||||
|
mkdocs build --verbose --clean --strict
|
||||||
|
rm -r site/
|
||||||
|
- name: Configure Git
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
id: git
|
||||||
|
run: |
|
||||||
|
git config --global user.name ghaction-k3d.io
|
||||||
|
git config --global user.email ghaction@k3d.io
|
||||||
|
echo ::set-output name=tag::${GITHUB_REF#refs/tags/}
|
||||||
|
- name: Build & Deploy with Mike (versioned)
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
run: |
|
||||||
|
mike deploy --update-aliases --push --rebase ${{ steps.git.outputs.tag }} stable
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user