This repository has been archived on 2023-11-06. You can view files and clone it, but cannot push or open issues or pull requests.
beatsaber-overlay/.gitlab-ci.yml

29 lines
745 B
YAML
Raw Normal View History

2023-01-13 23:27:46 +00:00
publish:
2023-01-13 23:24:27 +00:00
image: docker:latest
stage: build
variables:
DOCKER_DRIVER: overlay
services:
- docker:dind
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- echo "hi"
- docker build --pull -t "$CI_REGISTRY_IMAGE" .
- docker push "$CI_REGISTRY_IMAGE"
2023-01-13 23:24:27 +00:00
only:
- main
2023-01-13 15:19:09 +00:00
2023-01-13 23:08:04 +00:00
deploy:
image: alpine:latest
2023-01-13 22:52:21 +00:00
stage: deploy
2023-01-13 23:08:04 +00:00
tags:
2023-01-13 22:52:21 +00:00
script:
2023-01-13 23:33:07 +00:00
- chmod og= $ID_RSA
2023-01-13 23:08:04 +00:00
- apk update && apk add openssh-client
- ssh -i $ID_RSA -o StrictHostKeyChecking=no $SERVER_USER@$SERVER_IP "cd /home/overlay && docker compose pull && docker compose up -d && docker image prune -f"
environment:
name: production
url: https://bs-overlay.fascinated.cc
only:
2023-01-13 23:28:12 +00:00
- main