Skip to content

Commit 21b7b18

Browse files
Update copy-to-documentation-branch.yml
1 parent 26792a6 commit 21b7b18

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

.github/workflows/copy-to-documentation-branch.yml

+22-22
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,21 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818

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
2121
uses: actions/checkout@v2
2222
with:
23-
path: dst_repo
23+
path: mkdocs_build_folder
2424
ref: mkdocs
2525

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
2828
uses: actions/checkout@v2
2929
with:
3030
repository: hannesdelbeke/brain
31-
path: temp_submodule
31+
path: notes_source
3232

33-
# run janitor on markdown input
33+
# run janitor on markdown input to create backlinks
3434
- uses: actions/setup-node@v2
3535
with:
3636
node-version: '16'
@@ -45,31 +45,31 @@ jobs:
4545
yarn install
4646
yarn run build
4747
- 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
4949

50-
# Clean dst_repo/docs before syncing new files.
50+
# Clean mkdocs_build_folder/docs before syncing new files.
5151
# 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/
5656

5757
# 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
5959
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/
6262
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/
6565
6666
# # push repo
6767
# - name: push updates to mkdocs branch
6868
# # uses: ad-m/github-push-action@master
6969
# # with:
70-
# # directory: dst_repo
70+
# # directory: mkdocs_build_folder
7171
# run: |
72-
# cd dst_repo
72+
# cd mkdocs_build_folder
7373
# git config --global user.name github-actions
7474
# git config --global user.email github-actions@github.com
7575
# git add .
@@ -81,9 +81,9 @@ jobs:
8181
python-version: 3.x
8282
- name: install py requirements
8383
run: |
84-
cd dst_repo
84+
cd mkdocs_build_folder
8585
pip install --requirement requirements.txt
8686
- name: build mkdocs & deploy to github pages
8787
run: |
88-
cd dst_repo
88+
cd mkdocs_build_folder
8989
mkdocs gh-deploy --force

0 commit comments

Comments
 (0)