-
Notifications
You must be signed in to change notification settings - Fork 60
76 lines (67 loc) · 2.4 KB
/
mike-delete.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: delete published docs CI
on:
workflow_dispatch:
inputs:
version:
required: false
description: 'Version number from branch to delete'
default: "main"
type: string
alias:
required: false
description: 'Version or alias. Use a branch version for all docs use the alias to hide docs.'
default: "latest"
type: string
# title:
# required: false
# description: 'Doc site dropdown menu title (version +/- latest)'
# default: "latest"
# type: string
# pull_request:
# branches:
# - "master"
jobs:
install_dependencies_and_deploy:
name: install dependencies and deploy latest changes to prod
runs-on: ubuntu-latest
steps:
- name: checkout latest
uses: actions/checkout@v3
with:
ref: ${{ inputs.version }}
fetch-depth: 0
- name: setup python
uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip' # caching pip dependencies
- name: install dependencies
run: |
pip3 install -r requirements.txt
- name: Configure Git User
run: |
git config user.name "jasonnovichrunai"
git config user.email "[email protected]"
# git fetch origin gh-pages --depth=0
# - name: deploy mkdocs latest
# # run: mkdocs gh-deploy --force
# # echo "deploy new version with mike..."
# if: ${{ inputs.version == 'master'}}
# run: |
# mike deploy --push ${{ inputs.version }} ${{ inputs.alias }} --title=${{ inputs.title }}-latest
# mike set-default ${{ inputs.alias }} --ignore
# - name: deploy mkdocs version
# if: ${{ inputs.version != 'master' }}
# run: |
# mike deploy --push ${{ inputs.version }} ${{ inputs.alias }} --title=${{ inputs.title }}-latest
# mike set-default ${{ inputs.alias }} --ignore
# if [[ "${{ inputs.delete_latest }}" == 'true' ]]; then
# mike delete --push latest
# fi
# --title=${{ inputs.alias }}${latest}
# run: mike delete --push 2.9a
# mike delete --push ${{ inputs.version }}
- name: deploy mkdocs
run: |
mike delete --push ${{ inputs.alias }}
mike list