@@ -16,21 +16,21 @@ jobs:
16
16
runs-on : ubuntu-latest
17
17
steps :
18
18
19
- # clone the 'mkdocs' branch to the'dst_repo ' folder
20
- - name : checkout target repo ( branch)
19
+ # clone the 'mkdocs' branch to the'mkdocs_build_folder ' folder
20
+ - name : clone the mkdocs build branch
21
21
uses : actions/checkout@v2
22
22
with :
23
- path : dst_repo
23
+ path : mkdocs_build_folder
24
24
ref : mkdocs
25
25
26
- # load content files in submodule in the docs folder
27
- - name : load submodule
26
+ # clone the notes to the docs folder
27
+ - name : clone the notes to the docs folder
28
28
uses : actions/checkout@v2
29
29
with :
30
30
repository : hannesdelbeke/brain
31
- path : temp_submodule
31
+ path : notes_source
32
32
33
- # run janitor on markdown input
33
+ # run janitor on markdown input to create backlinks
34
34
- uses : actions/setup-node@v2
35
35
with :
36
36
node-version : ' 16'
@@ -45,31 +45,31 @@ jobs:
45
45
yarn install
46
46
yarn run build
47
47
- name : Run Note Link Janitor
48
- run : ${{ github.workspace }}/note-link-janitor/dist/index.js ${{ github.workspace }}/temp_submodule
48
+ run : ${{ github.workspace }}/note-link-janitor/dist/index.js ${{ github.workspace }}/notes_source
49
49
50
- # Clean dst_repo /docs before syncing new files.
50
+ # Clean mkdocs_build_folder /docs before syncing new files.
51
51
# prevents duplicate files in case we moved a file.
52
- - name : clean dst_repo /docs
53
- run : |
54
- rm -rf dst_repo /docs/*
55
- mkdir -p dst_repo /docs/
52
+ # - name: clean mkdocs_build_folder /docs
53
+ # run: |
54
+ # rm -rf mkdocs_build_folder /docs/*
55
+ # mkdir -p mkdocs_build_folder /docs/
56
56
57
57
# first move image, then notes. # docs folder already exists, it contains css in assets
58
- - name : move submodule files to dst_repo
58
+ - name : move submodule files to mkdocs_build_folder
59
59
run : |
60
- mkdir -p dst_repo /static/images/
61
- mv temp_submodule /image/* dst_repo/static /images/
60
+ mkdir -p mkdocs_build_folder /static/images/
61
+ mv notes_source /image/* mkdocs_build_folder/docs /images/
62
62
63
- rm --force -r temp_submodule /.git
64
- rsync -av temp_submodule /* dst_repo /docs/
63
+ rm --force -r notes_source /.git
64
+ rsync -av notes_source /* mkdocs_build_folder /docs/
65
65
66
66
# # push repo
67
67
# - name: push updates to mkdocs branch
68
68
# # uses: ad-m/github-push-action@master
69
69
# # with:
70
- # # directory: dst_repo
70
+ # # directory: mkdocs_build_folder
71
71
# run: |
72
- # cd dst_repo
72
+ # cd mkdocs_build_folder
73
73
# git config --global user.name github-actions
74
74
# git config --global user.email github-actions@github.com
75
75
# git add .
81
81
python-version : 3.x
82
82
- name : install py requirements
83
83
run : |
84
- cd dst_repo
84
+ cd mkdocs_build_folder
85
85
pip install --requirement requirements.txt
86
86
- name : build mkdocs & deploy to github pages
87
87
run : |
88
- cd dst_repo
88
+ cd mkdocs_build_folder
89
89
mkdocs gh-deploy --force
0 commit comments