Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
R3
howto-cards
Commits
21a2a6d5
Verified
Commit
21a2a6d5
authored
Jul 23, 2020
by
Laurent Heirendt
✈
Browse files
remove old deployment scripts
parent
946f4fc6
Changes
2
Hide whitespace changes
Inline
Side-by-side
.ci/build_indices.sh
deleted
100644 → 0
View file @
946f4fc6
#!/bin/bash
DIRECTORY
=
build
# Install lunr to build the index
npm
install
lunr@2.3.8
# Go to the directory...
cd
$DIRECTORY
printf
"Found the following build targets inside:
\n
$(
ls
-d
*
/
)
\n\n
"
# ...and loop through all the build targets
for
branch
in
$(
ls
-d
*
/
)
;
do
echo
"Entering:
$branch
"
;
cd
"
$branch
"
;
echo
"Generating the index..."
cat
documents.js | node
$CI_PROJECT_DIR
/build_index.js
>
index.js
rm
documents.js build_index.js
echo
"...should be completed. First 50 characters of the index: "
cat
index.js |
head
-c50
echo
""
cd
..
done
rm
$CI_PROJECT_DIR
/build_index.js
.ci/deploy.sh
deleted
100644 → 0
View file @
946f4fc6
mkdir
-p
build
artefact
=
"latest"
# loop through all the branches
for
branch
in
$(
git
for
-each-ref
--format
=
'%(refname:strip=3)'
refs/remotes
)
;
do
echo
$branch
;
if
[[
$branch
==
"master"
]]
;
then
artefact
=
"stable"
;
elif
[[
$branch
==
"develop"
]]
;
then
artefact
=
"latest"
;
else
artefact
=
"unstable"
;
fi
echo
$artefact
;
git checkout
-f
$branch
git reset
--hard
$branch
git pull
# Generate the config dynamically
echo
'url: "https://r3.pages.uni.lu"'
>
_config_url.yml
# build the website
bundle
install
bundle
exec
jekyll build
--config
"_config.yml,_config_url.yml"
--baseurl
=
"howto-cards/
$artefact
"
-d
"build/
$artefact
"
if
[[
$branch
==
"master"
]]
;
then
# set the 404
cp
howto-cards/
$artefact
/404.html build/404.html
fi
done
# checkout the current branch
echo
$CI_COMMIT_REF_NAME
git checkout
-f
$CI_COMMIT_REF_NAME
git reset
--hard
origin/
$CI_COMMIT_REF_NAME
# set the auto redirection
cp
.ci/.autoRedirect build/index.html
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment