-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (36 loc) · 1.05 KB
/
deploy-mkdocs.yml
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
name: Deploy MkDocs Site
on:
push:
branches:
- main # Trigger the workflow on push to main branch
paths:
- "docs/**"
- "mkdocs.yml"
- ".github/workflows/deploy-mkdocs.yml"
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
env:
IMAGE: ghcr.io/rox-automation/roxbot:latest
steps:
- name: Checkout code
uses: actions/checkout@v2j
- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Pull the Docker image
run: docker pull ${{ env.IMAGE }}
- name: Run MkDocs build
run: |
docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace ${{ env.IMAGE }} mkdocs build -d /site
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site