mirror of
https://github.com/TeachBooks/template.git
synced 2026-11-12 22:25: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:
|
||||
path: "final/"
|
||||
|
||||
- name: Symlink `book` to `main`
|
||||
- name: Copy primary book to root, fail if names conflict
|
||||
timeout-minutes: 1
|
||||
run: |
|
||||
if test -d final/main; then
|
||||
ln -s main final/book
|
||||
GLOBIGNORE=".:.."
|
||||
# -i leads to a prompt in case of conflict, => a timeout
|
||||
if [ -d final/$PRIMARY_BRANCH ]; then
|
||||
cp -irv final/$PRIMARY_BRANCH/* final/
|
||||
fi
|
||||
ls -a final/
|
||||
|
||||
- name: Load root page to redirect to `book/`
|
||||
run: |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue