7
7
description : ' Docs tag to deploy'
8
8
required : true
9
9
type : string
10
+ default : main
10
11
mkdocs-terminal-version :
11
12
description : ' with mkdocs-terminal version'
12
13
required : false
13
14
type : string
14
- example-site -name :
15
- description : ' name of site in ./tests/examples/ '
15
+ environment -name :
16
+ description : ' Name of the environment to deploy '
16
17
required : true
17
18
type : choice
18
19
options :
19
20
- highlightjs
20
21
- highlightjs-dark
21
22
22
23
jobs :
23
- deploy-highlightjs-example :
24
- name : Deploy ${{ inputs.example-site-name }}
25
- if : inputs.example-site-name == 'highlightjs'
26
- uses : ntno/mkdocs-terminal/.github/workflows/reusable-pages-deploy.yml@main
27
- with :
28
- tag : ${{ inputs.tag }}
29
- mkdocs-terminal-version : ${{ inputs.mkdocs-terminal-version }}
30
- example-site-name : ' highlightjs'
31
- secrets :
32
- GH_DEPLOY_KEY : ${{ secrets.DEPLOY_KEY_HIGHLIGHTJS }}
33
-
34
- deploy-highlightjs-dark-example :
35
- name : Deploy ${{ inputs.example-site-name }}
36
- if : inputs.example-site-name == 'highlightjs-dark'
37
- uses : ntno/mkdocs-terminal/.github/workflows/reusable-pages-deploy.yml@main
38
- with :
39
- tag : ${{ inputs.tag }}
40
- mkdocs-terminal-version : ${{ inputs.mkdocs-terminal-version }}
41
- example-site-name : ' highlightjs-dark'
42
- secrets :
43
- GH_DEPLOY_KEY : ${{ secrets.DEPLOY_KEY_HIGHLIGHTJS_DARK }}
24
+ deploy-example-site :
25
+ name : Deploy ${{ inputs.environment-name }}
26
+ environment : ${{ inputs.environment-name }}
27
+ runs-on : ubuntu-latest
28
+ steps :
29
+ - name : Checkout
30
+ uses : actions/checkout@v4
31
+ with :
32
+ ref : ${{ inputs.tag }}
33
+ - name : Install Explicitly Set mkdocs-terminal Version
34
+ run : |
35
+ if [[ "${{ inputs.mkdocs-terminal-version }}" == "" ]]; then
36
+ echo "no mkdocs-version override specified..."
37
+ else
38
+ pip install mkdocs-terminal==${{ inputs.mkdocs-terminal-version }}
39
+ fi
40
+ - name : Build MkDocs
41
+ run : |
42
+ cd tests/examples
43
+ make build site="${{ vars.EXAMPLE_NAME }}"
44
+ cd -
45
+ - name : Deploy to GitHub Pages
46
+ uses : peaceiris/actions-gh-pages@v4
47
+ with :
48
+ deploy_key : ${{ secrets.DEPLOY_KEY }}
49
+ external_repository : ${{ vars.GH_REPOSITORY_OWNER }}/${{ vars.GH_REPOSITORY_NAME }}
50
+ publish_dir : ./tests/examples/${{ vars.EXAMPLE_NAME }}/site
0 commit comments