Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
howto-cards
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marie Fossepre
howto-cards
Commits
21a2a6d5
Verified
Commit
21a2a6d5
authored
4 years ago
by
Laurent Heirendt
Browse files
Options
Downloads
Patches
Plain Diff
remove old deployment scripts
parent
946f4fc6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.ci/build_indices.sh
+0
-31
0 additions, 31 deletions
.ci/build_indices.sh
.ci/deploy.sh
+0
-38
0 additions, 38 deletions
.ci/deploy.sh
with
0 additions
and
69 deletions
.ci/build_indices.sh
deleted
100644 → 0
+
0
−
31
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
This diff is collapsed.
Click to expand it.
.ci/deploy.sh
deleted
100644 → 0
+
0
−
38
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment