mirror of
https://codeberg.org/keyoxide/keyoxide-web.git
synced 2024-12-22 23:09:29 -07:00
55 lines
1.2 KiB
YAML
55 lines
1.2 KiB
YAML
---
|
|
|
|
kind: pipeline
|
|
type: exec
|
|
name: deploy to prod
|
|
|
|
steps:
|
|
- name: composer
|
|
commands:
|
|
- composer install
|
|
- name: deploy to server
|
|
environment:
|
|
DEPLOY_COMMAND:
|
|
from_secret: deploy_command_prod
|
|
commands:
|
|
- $${DEPLOY_COMMAND}
|
|
|
|
trigger:
|
|
branch:
|
|
- main
|
|
event:
|
|
- push
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
type: exec
|
|
name: deploy to dev
|
|
|
|
steps:
|
|
- name: build docker container
|
|
commands:
|
|
- docker build -t keyoxide/keyoxide:dev ./
|
|
- name: push to docker hub
|
|
commands:
|
|
- docker push keyoxide/keyoxide:dev
|
|
- name: pull docker container
|
|
commands:
|
|
- docker pull keyoxide/keyoxide:dev
|
|
- name: stop and remove existing docker container
|
|
commands:
|
|
- docker stop keyoxide-web
|
|
- docker rm keyoxide-web
|
|
- name: run new docker container
|
|
environment:
|
|
TWITTER_API_AUTH:
|
|
from_secret: twitter_api_auth
|
|
commands:
|
|
- docker run -d -e "TWITTER_API_AUTH=$${TWITTER_API_AUTH}" --name keyoxide-web -h keyoxide --network dc_web keyoxide-web
|
|
|
|
trigger:
|
|
branch:
|
|
- dev
|
|
event:
|
|
- push
|