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
35347ba2
Commit
35347ba2
authored
7 months ago
by
Kwangjin Lee
Browse files
Options
Downloads
Patches
Plain Diff
Update .gitlab-ci.yml file
parent
299dbce8
No related branches found
Branches containing commit
No related tags found
1 merge request
!10
merge for publish
Pipeline
#244999
passed
7 months ago
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+14
-5
14 additions, 5 deletions
.gitlab-ci.yml
with
14 additions
and
5 deletions
.gitlab-ci.yml
+
14
−
5
View file @
35347ba2
...
@@ -20,13 +20,22 @@ build-page:
...
@@ -20,13 +20,22 @@ build-page:
script
:
script
:
-
|
-
|
if [[ "$CI_COMMIT_BRANCH" == "main" ]]; then
if [[ "$CI_COMMIT_BRANCH" == "main" ]]; then
echo "Building draft site..."
JEKYLL_ENV=production bundle exec jekyll build --config _config_draft.yml --destination public
JEKYLL_ENV=production bundle exec jekyll build --config _config_draft.yml --destination public
elif [[ "$CI_COMMIT_BRANCH" == "publish" ]]; then
elif [[ "$CI_COMMIT_BRANCH" == "publish" ]]; then
echo "Building production site..."
JEKYLL_ENV=production bundle exec jekyll build --config _config.yml --destination public
JEKYLL_ENV=production bundle exec jekyll build --config _config.yml --destination public
else
else
echo "Branch is neither main nor publish. Skipping build."
echo "Branch is neither main nor publish. Skipping build."
exit 1
exit 1
fi
fi
-
cp _config.yml public/
-
cp -R _includes public/
-
cp -R _layouts public/
-
cp -R _sass public/
-
cp -R assets public/
-
cp Gemfile public/
-
cp Gemfile.lock public/
-
echo "Listing contents of public directory:"
-
echo "Listing contents of public directory:"
-
ls -laR public
-
ls -laR public
artifacts
:
artifacts
:
...
@@ -39,8 +48,6 @@ build-page:
...
@@ -39,8 +48,6 @@ build-page:
deploy-draft
:
deploy-draft
:
stage
:
deploy
stage
:
deploy
needs
:
[
"
build-page"
]
needs
:
[
"
build-page"
]
rules
:
-
if
:
$CI_COMMIT_BRANCH == "main"
script
:
script
:
-
|
-
|
curl -X POST https://mude.citg.tudelft.nl/hooks/website-deploy-draft \
curl -X POST https://mude.citg.tudelft.nl/hooks/website-deploy-draft \
...
@@ -56,12 +63,12 @@ deploy-draft:
...
@@ -56,12 +63,12 @@ deploy-draft:
environment
:
environment
:
name
:
draft
name
:
draft
url
:
https://mude.citg.tudelft.nl/2024/draft
url
:
https://mude.citg.tudelft.nl/2024/draft
rules
:
-
if
:
$CI_COMMIT_BRANCH == "main"
deploy-production
:
deploy-production
:
stage
:
deploy
stage
:
deploy
needs
:
[
"
build-page"
]
needs
:
[
"
build-page"
]
rules
:
-
if
:
$CI_COMMIT_BRANCH == "publish"
script
:
script
:
-
|
-
|
curl -X POST https://mude.citg.tudelft.nl/hooks/website-deploy \
curl -X POST https://mude.citg.tudelft.nl/hooks/website-deploy \
...
@@ -76,4 +83,6 @@ deploy-production:
...
@@ -76,4 +83,6 @@ deploy-production:
}'
}'
environment
:
environment
:
name
:
production
name
:
production
url
:
https://mude.citg.tudelft.nl/2024
url
:
https://mude.citg.tudelft.nl/2024
\ No newline at end of file
rules
:
-
if
:
$CI_COMMIT_BRANCH == "publish"
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