-
Notifications
You must be signed in to change notification settings - Fork 2
39 lines (34 loc) · 1.07 KB
/
ci.yml
File metadata and controls
39 lines (34 loc) · 1.07 KB
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
name: ci
on:
push:
branches:
- main
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git init .
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git remote add origin https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git
git fetch --depth=1 origin main
git checkout -t origin/main
- name: Setup Python
run: |
python -m pip install --upgrade pip
pip install mkdocs-material
- name: Build site
run: mkdocs build
- name: Deploy to gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
mkdocs gh-deploy --force --remote-name origin --remote-branch gh-pages