-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (37 loc) · 1.28 KB
/
ci.yml
File metadata and controls
37 lines (37 loc) · 1.28 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
# https://squidfunk.github.io/mkdocs-material/publishing-your-site/#with-github-actions
name: ci
on:
push:
branches:
- master
- main
jobs:
# copy:
# name: Copy my folder
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - name: copy
# env:
# SRC_FOLDER_PATH: 'Base'
# TARGET_BRANCH: 'docs'
# run: |
# files=$(find $SRC_FOLDER_PATH -type f) # get the file list
# git config --global user.name 'GitHub Action'
# git config --global user.email 'action@github.com'
# git fetch # fetch branches
# git checkout $TARGET_BRANCH # checkout to your branch
# git checkout ${GITHUB_REF##*/} -- $files # copy files from the source branch
# git add -A
# git diff-index --quiet HEAD || git commit -am "deploy files" # commit to the repository (ignore if no modification)
# git push origin $TARGET_BRANCH # push to remote branch
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.x
- run: cp -r ./Base ./docs
- run: pip install mkdocs-material
- run: mkdocs gh-deploy --force