-
Notifications
You must be signed in to change notification settings - Fork 3
34 lines (33 loc) · 1.1 KB
/
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
name: mkdocs
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies
run: |
pip3 install mkdocs mkdocs-material mdx_truly_sane_lists
- name: Prepare build source
run: |
mkdir -p docs/
find -mindepth 1 -maxdepth 1 -not -name docs -print0 | xargs -0rI % mv % docs/
(cd docs/; mv .git .github mkdocs.yml ../) # Move some stuff back
- name: Build docs
run: |
mkdocs -v build
#printf osh.ibugone.com > site/CNAME
- name: Deploy to GitHub Pages
run: |
git clone --depth=1 --branch=main --single-branch --no-checkout \
"https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git" test
mv test/.git site/.git && rmdir test/
pushd site/ &>/dev/null
git add -A
git -c user.name=GitHub -c [email protected] commit \
-m 'GitHub Actions' --amend
git push origin +main:gh
popd &>/dev/null