Attempt to fix pages deployment
This commit is contained in:
parent
565277d589
commit
c409f6f58c
2 changed files with 10 additions and 8 deletions
8
.github/workflows/build_docs.yml
vendored
8
.github/workflows/build_docs.yml
vendored
|
@ -173,7 +173,7 @@ jobs:
|
|||
continue-on-error: true
|
||||
with:
|
||||
ref: gh-pages
|
||||
path: _site/
|
||||
path: gh-pages/
|
||||
|
||||
- name: Download temporary Pages artifact
|
||||
uses: actions/download-artifact@v3
|
||||
|
@ -182,7 +182,7 @@ jobs:
|
|||
path: _new_site/
|
||||
|
||||
- name: Add new docs to site
|
||||
run: hexdoc_merge --source _new_site --dest _site --release "${{ needs.build.outputs.release == true }}"
|
||||
run: hexdoc_merge --source _new_site --dest gh-pages/docs --release "${{ needs.build.outputs.release == true }}"
|
||||
|
||||
- name: Fix permissions
|
||||
run: |
|
||||
|
@ -194,7 +194,7 @@ jobs:
|
|||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: github-pages
|
||||
path: _site/
|
||||
path: gh-pages/docs
|
||||
|
||||
deploy-pages:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -204,6 +204,7 @@ jobs:
|
|||
contents: write
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Download Pages artifact
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
|
@ -214,3 +215,4 @@ jobs:
|
|||
uses: JamesIves/github-pages-deploy-action@v4
|
||||
with:
|
||||
folder: _site
|
||||
target-folder: docs
|
||||
|
|
|
@ -46,7 +46,7 @@ def main():
|
|||
if args.release:
|
||||
# remove current latest-released book in the destination
|
||||
for path in args.dest.iterdir():
|
||||
if path.name not in ["v", "meta"]:
|
||||
if path.name not in ["v", "meta", "dist", ".git"]:
|
||||
shutil.rmtree(path)
|
||||
|
||||
new_sitemap = defaultdict[str, dict[str, str]](dict)
|
||||
|
@ -56,10 +56,10 @@ def main():
|
|||
new_sitemap[marker.version][marker.lang] = marker.path
|
||||
|
||||
# delete the corresponding directory in the destination
|
||||
shutil.rmtree(
|
||||
args.dest / marker_path.parent.relative_to(args.source),
|
||||
ignore_errors=True,
|
||||
)
|
||||
marker_dest_dir = args.dest / marker_path.parent.relative_to(args.source)
|
||||
shutil.rmtree(marker_dest_dir, ignore_errors=True)
|
||||
|
||||
marker_path.unlink()
|
||||
|
||||
sitemap_path = args.dest / "meta" / "sitemap.json"
|
||||
|
||||
|
|
Loading…
Reference in a new issue