Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
2024-website
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MUDE
2024-website
Commits
e7dbb5c2
Commit
e7dbb5c2
authored
7 months ago
by
Kwangjin Lee
Browse files
Options
Downloads
Plain Diff
Merge branch 'publish'
parents
299dbce8
fdc13a5b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!4
Update 2 files
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+25
-24
25 additions, 24 deletions
.gitlab-ci.yml
_config.yml
+2
-1
2 additions, 1 deletion
_config.yml
with
27 additions
and
25 deletions
.gitlab-ci.yml
+
25
−
24
View file @
e7dbb5c2
image
:
ruby:
latest
image
:
ruby:
3.2.2-bookworm
stages
:
-
build
-
deploy
variables
:
GEM_HOME
:
$CI_PROJECT_DIR/vendor/bundle
cache
:
paths
:
-
vendor/bundle
before_script
:
-
bundle config set --local path 'vendor/bundle'
-
bundle install
JEKYLL_ENV
:
production
LC_ALL
:
C.UTF-8
build-page
:
stage
:
build
variables
:
JEKYLL_ENV
:
production
before_script
:
-
gem install bundler
-
bundle install
-
wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 --no-verbose -O /usr/local/bin/yq
-
chmod +x /usr/local/bin/yq
-
chmod +x ./build-page.sh
script
:
-
|
if [[ "$CI_COMMIT_BRANCH" == "main" ]]; then
JEKYLL_ENV=production bundle exec jekyll build --config _config_draft.yml --destination public
elif [[ "$CI_COMMIT_BRANCH" == "publish" ]]; then
JEKYLL_ENV=production bundle exec jekyll build --config _config.yml --destination public
if [ "$CI_COMMIT_BRANCH" == "publish" ] || [ "$CI_COMMIT_BRANCH" == "main" ]; then
echo "Running on branch $CI_COMMIT_BRANCH"
./build-page.sh "/" true
else
echo "
Branch is neither main nor publish. Skipping build.
"
exit 1
echo "
Running on other branches
"
./build-page.sh /draft false
fi
-
echo "Listing contents of public directory:"
-
ls -laR public
artifacts
:
paths
:
-
public
expire_in
:
1 week
rules
:
-
if
:
$CI_COMMIT_BRANCH == "main" || $CI_COMMIT_BRANCH == "publish"
-
if
:
$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "publish"
when
:
always
deploy-draft
:
stage
:
deploy
needs
:
[
"
build-page"
]
rules
:
-
if
:
$CI_COMMIT_BRANCH == "main"
script
:
-
|
curl -X POST https://mude.citg.tudelft.nl/hooks/website-deploy-draft \
...
...
@@ -56,12 +53,13 @@ deploy-draft:
environment
:
name
:
draft
url
:
https://mude.citg.tudelft.nl/2024/draft
rules
:
-
if
:
$CI_COMMIT_BRANCH == "main" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "main"
when
:
always
deploy-production
:
stage
:
deploy
needs
:
[
"
build-page"
]
rules
:
-
if
:
$CI_COMMIT_BRANCH == "publish"
script
:
-
|
curl -X POST https://mude.citg.tudelft.nl/hooks/website-deploy \
...
...
@@ -76,4 +74,7 @@ deploy-production:
}'
environment
:
name
:
production
url
:
https://mude.citg.tudelft.nl/2024
\ No newline at end of file
url
:
https://mude.citg.tudelft.nl/2024
rules
:
-
if
:
$CI_COMMIT_BRANCH == "publish" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "publish"
when
:
always
This diff is collapsed.
Click to expand it.
_config.yml
+
2
−
1
View file @
e7dbb5c2
...
...
@@ -99,4 +99,5 @@ compress_html:
blanklines
:
false
profile
:
false
draft_banner
:
"
This
is
the
DRAFT
version
of
the
MUDE
2024
website.
Content
may
change
frequently."
is_draft
:
true
draft_banner
:
"
This
is
the
DRAFT
version
of
the
MUDE
2024
website.
Content
may
change
frequently."
\ No newline at end of file
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