Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
wocat-web
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
ISRIC
wocat
wocat-web
Commits
33f41dbf
Commit
33f41dbf
authored
2 years ago
by
Andreas Nüßlein
Browse files
Options
Downloads
Patches
Plain Diff
enable CI/CD for production
parent
a45c0ab6
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+22
-17
22 additions, 17 deletions
.gitlab-ci.yml
with
22 additions
and
17 deletions
.gitlab-ci.yml
+
22
−
17
View file @
33f41dbf
...
...
@@ -67,20 +67,25 @@ deploy to staging:
only
:
-
main
#deploy to production:
# stage: deploy
# script:
# - eval $(ssh-agent -s)
# - echo "$PRODUCTION_SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
# - |
# ssh $PRODUCTION_USER@$PRODUCTION_HOST << E=O=F
# set -e
# mv maintenance.html_ maintenance.html || echo "could not move maintenance"
# cd ~/htdocs
# poetry run doit full_update production=True branch=production
# sudo /bin/systemctl restart webapp-qcat.wocat.net.service
# cd ~
# mv maintenance.html maintenance.html_
# E=O=F
# only:
# - production
deploy to production
:
stage
:
deploy
script
:
-
apt update
-
apt install openssh-client -y
-
eval $(ssh-agent -s)
-
echo "$PRODUCTION_SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
-
|
ssh -o StrictHostKeyChecking=no $PRODUCTION_USER@$PRODUCTION_HOST << E=O=F
set -e
mv maintenance.html_ maintenance.html || echo "could not move maintenance"
cd ~/htdocs
git pull
git switch production
poetry install
poetry run doit update
sudo /bin/systemctl restart webapp-wocat.net.service
cd ~
mv maintenance.html maintenance.html_
E=O=F
only
:
-
production
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