-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b712705
commit ffb8c0e
Showing
1 changed file
with
8 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,38 +32,28 @@ jobs: | |
- name: Build Docs with sphinx-multiversion | ||
run: | | ||
poetry run sphinx-multiversion docs docs/_build/html | ||
# Create a temporary directory | ||
TEMP_DIR=$(mktemp -d) | ||
echo "Temporary directory is $TEMP_DIR" | ||
poetry run sphinx-multiversion docs $TEMP_DIR | ||
- name: Create Redirection HTML | ||
run: | | ||
echo '<meta http-equiv="refresh" content="0; URL='https://saezlab.github.io/corneto/main'" />' > docs/_build/html/index.html | ||
- name: Prepare Deployment | ||
run: | | ||
touch ./docs/_build/html/.nojekyll | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
echo '<meta http-equiv="refresh" content="0; URL='https://saezlab.github.io/corneto/main'" />' > $TEMP_DIR/index.html | ||
- name: Deploy to GitHub Pages | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
# Create a temporary directory | ||
TEMP_DIR=$(mktemp -d) | ||
echo "Temporary directory is $TEMP_DIR" | ||
# Build and prepare all the files first | ||
mkdir -p "$TEMP_DIR/$BRANCH_NAME" | ||
cp -r "docs/_build/html/." "$TEMP_DIR/$BRANCH_NAME/" | ||
touch $TEMP_DIR/.nojekyll | ||
# Now checkout to gh-pages | ||
git fetch origin gh-pages | ||
git checkout gh-pages || git checkout --orphan gh-pages | ||
# Clean existing files for the branch and copy new ones | ||
rm -rf "./$BRANCH_NAME" | ||
cp -r "$TEMP_DIR/$BRANCH_NAME/." "./$BRANCH_NAME/" | ||
rm -rf "$BRANCH_NAME" | ||
cp -r "$TEMP_DIR/$BRANCH_NAME" "$BRANCH_NAME" | ||
|
||
# Adding changes to git | ||
git add . | ||
|