mirror of
https://github.com/TeachBooks/template.git
synced 2026-11-13 14:45:52 +00:00
Make primary branch accessible at page root
This commit is contained in:
parent
3bc40cc4b9
commit
01d0f3943f
1 changed files with 7 additions and 3 deletions
10
.github/workflows/deploy-book-ghpages.yml
vendored
10
.github/workflows/deploy-book-ghpages.yml
vendored
|
|
@ -105,11 +105,15 @@ jobs:
|
||||||
with:
|
with:
|
||||||
path: "final/"
|
path: "final/"
|
||||||
|
|
||||||
- name: Symlink `book` to `main`
|
- name: Copy primary book to root, fail if names conflict
|
||||||
|
timeout-minutes: 1
|
||||||
run: |
|
run: |
|
||||||
if test -d final/main; then
|
GLOBIGNORE=".:.."
|
||||||
ln -s main final/book
|
# -i leads to a prompt in case of conflict, => a timeout
|
||||||
|
if [ -d final/$PRIMARY_BRANCH ]; then
|
||||||
|
cp -irv final/$PRIMARY_BRANCH/* final/
|
||||||
fi
|
fi
|
||||||
|
ls -a final/
|
||||||
|
|
||||||
- name: Load root page to redirect to `book/`
|
- name: Load root page to redirect to `book/`
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue