-
Notifications
You must be signed in to change notification settings - Fork 3
61 lines (52 loc) · 1.44 KB
/
deploy.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#
# This is a working example of using GitHub Actions to publish the docs
# to the GitHub Pages (gh_pages) branch.
#
# Remember to have a requirements.txt file with the required dependencies.
# This template ships with one by default.
#
# It is also recommendet to also copy the template with all branches, to
# have the gh-pages branch pre-made. This prevents possible errors.
#
name: Deploy Site
#on: [push, pull_request]
on:
push:
branches:
- main
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install mkdocs-material
- name: Deploy Files
run: |
#git config user.name "github-actions[bot]"
#git config user.email "actions@github.com"
git config user.name "github-actions[bot]"
git config user.email "actions@github.com"
mkdocs build
cp -r site /tmp
git fetch
git checkout gh-pages --force
rm -r *
cp -r /tmp/site/* .
echo 'listing'
ls
echo 'listing tmp'
ls /tmp
git add * */*
git commit -m 'Adding files.'
git push origin gh-pages -f
#mkdocs build
#mkdocs gh-deploy --force