Skip to content

Commit 26792a6

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

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

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

+9-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ jobs:
1515
copy-content-to-mkdocs-branch:
1616
runs-on: ubuntu-latest
1717
steps:
18-
18+
19+
# clone the 'mkdocs' branch to the'dst_repo' folder
1920
- name: checkout target repo (branch)
2021
uses: actions/checkout@v2
2122
with:
@@ -46,6 +47,13 @@ jobs:
4647
- name: Run Note Link Janitor
4748
run: ${{ github.workspace }}/note-link-janitor/dist/index.js ${{ github.workspace }}/temp_submodule
4849

50+
# Clean dst_repo/docs before syncing new files.
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/
56+
4957
# first move image, then notes. # docs folder already exists, it contains css in assets
5058
- name: move submodule files to dst_repo
5159
run: |

0 commit comments

Comments
 (0)