Skip to content
Snippets Groups Projects
Commit 89c397b1 authored by georg's avatar georg
Browse files

Merge branch 'main-is-main-in-gitlabci' into 'main'

Make gitlab ci use main as main branch.

See merge request schleuder/schleuder-website!100
parents 0e48de6c 5ffb5430
No related branches found
No related tags found
No related merge requests found
Pipeline #55909 passed
...@@ -12,8 +12,8 @@ variables: ...@@ -12,8 +12,8 @@ variables:
build: build:
script: script:
# Set jekylls 'baseurl' option in case we're not dealing with the master branch. # Set jekylls 'baseurl' option in case we're not dealing with the main branch.
- 'if ! [ "$CI_COMMIT_REF_SLUG" == "master" ]; then - 'if ! [ "$CI_COMMIT_REF_SLUG" == "main" ]; then
echo "baseurl: /$DEPLOY_SLUG" >> _config.yml; echo "baseurl: /$DEPLOY_SLUG" >> _config.yml;
fi' fi'
- jekyll build --verbose - jekyll build --verbose
...@@ -41,11 +41,11 @@ deploy: ...@@ -41,11 +41,11 @@ deploy:
|1|8YPsezXF2SYQ7rq9U5TbDnMsVjo=|SJOodZB+8j+dO+l6YTdZ7+44XLw= ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPJx38PfGvaHtkSsHptiHoIQxlI3Yf0cskPNTwAQnY14 |1|8YPsezXF2SYQ7rq9U5TbDnMsVjo=|SJOodZB+8j+dO+l6YTdZ7+44XLw= ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPJx38PfGvaHtkSsHptiHoIQxlI3Yf0cskPNTwAQnY14
" > ~/.ssh/known_hosts " > ~/.ssh/known_hosts
- tar fxv site.tar.gz - tar fxv site.tar.gz
# In case we're not dealing with the master branch, create the review dir on the webserver. # In case we're not dealing with the main branch, create the review dir on the webserver.
# We need to catch possible errors, as lftp seems buggy: It fails if the dir already exists, # We need to catch possible errors, as lftp seems buggy: It fails if the dir already exists,
# even if called with the -f option, which should ignore errors (like this one). # even if called with the -f option, which should ignore errors (like this one).
# lftp needs a "dummy" password, even if key-based authentication is used. # lftp needs a "dummy" password, even if key-based authentication is used.
- if ! [ "$CI_COMMIT_REF_SLUG" == "master" ]; - if ! [ "$CI_COMMIT_REF_SLUG" == "main" ];
then DEPLOY_SLUG="www/$DEPLOY_SLUG"; then DEPLOY_SLUG="www/$DEPLOY_SLUG";
export DEPLOY_SLUG; export DEPLOY_SLUG;
lftp -e "mkdir -fp $DEPLOY_SLUG; quit" -u $DEPLOY_USER,dummy sftp://$DEPLOY_HOST || /bin/true; lftp -e "mkdir -fp $DEPLOY_SLUG; quit" -u $DEPLOY_USER,dummy sftp://$DEPLOY_HOST || /bin/true;
...@@ -73,11 +73,11 @@ codespell: ...@@ -73,11 +73,11 @@ codespell:
# Also, exclude the vendor dir, which leads to false positives. # Also, exclude the vendor dir, which leads to false positives.
- codespell -q 2 -f -I utils/ci/codespell/ignored_words.txt -S vendor - codespell -q 2 -f -I utils/ci/codespell/ignored_words.txt -S vendor
# This job should help with merge requests. Therefore, don't run it # This job should help with merge requests. Therefore, don't run it
# against the master branch. # against the main branch.
only: only:
- branches - branches
except: except:
- master - main
stage: qa stage: qa
linkcheck: linkcheck:
...@@ -89,9 +89,9 @@ linkcheck: ...@@ -89,9 +89,9 @@ linkcheck:
# This job relies on secret env vars, which are only available in our repo. # This job relies on secret env vars, which are only available in our repo.
- branches@schleuder/schleuder-website - branches@schleuder/schleuder-website
except: except:
# This job should help with merge requests, so there is no point in running it against the master # This job should help with merge requests, so there is no point in running it against the main
# branch. # branch.
- master@schleuder/schleuder-website - main@schleuder/schleuder-website
stage: qa stage: qa
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment