beta.fogtype.com/.drone.yml

30 lines
899 B
YAML
Raw Normal View History

2023-01-02 00:40:21 +09:00
# yaml-language-server: $schema=https://json.schemastore.org/drone.json
name: deploy
kind: pipeline
type: docker
node:
instance: system
trigger:
event:
- push
branch:
- main
steps:
- name: deploy
image: docker:23.0.2-cli-alpine3.17@sha256:a3a5b560b6b4c4005eba5ebbd3311830826402adbd9cb93e33252999375358eb
2023-01-02 00:40:21 +09:00
commands:
- mkdir -p /root/.ssh
- install -v -m 600 /home/ubuntu/.ssh/id_ed25519 /root/.ssh/id_ed25519
- ssh-keyscan beta.fogtype.com >> /root/.ssh/known_hosts
- docker context create --docker=host=ssh://ubuntu@beta.fogtype.com beta
- docker context use beta
2023-01-02 01:43:38 +09:00
- docker compose --project-name=beta up --build --detach
2023-01-02 01:15:12 +09:00
- docker compose --project-directory=example up --detach
2023-01-02 00:40:21 +09:00
volumes:
- name: ssh_key
path: /home/ubuntu/.ssh/id_ed25519
volumes:
- name: ssh_key
host:
path: /home/ubuntu/.ssh/id_ed25519