49 lines
1.3 KiB
YAML
49 lines
1.3 KiB
YAML
name: Deploy dev on push
|
|
run-name: Deploy dev on push
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
on-push-deploy_sh-edraft:
|
|
runs-on: [ dobby.sh-edraft.de, ubuntu-latest ]
|
|
container: catthehacker/ubuntu:act-latest
|
|
steps:
|
|
- name: Setup Python 3.10
|
|
uses: actions/setup-python@v3
|
|
with:
|
|
python-version: "3.10.12"
|
|
- run: python -v
|
|
|
|
- name: Setup docker
|
|
uses: https://github.com/papodaca/install-docker-action@main
|
|
- run: docker -v
|
|
|
|
- name: Clone Repository
|
|
uses: https://github.com/actions/checkout@v3
|
|
|
|
- name: Install cpl cli
|
|
run: |
|
|
pip install --extra-index-url https://pip.sh-edraft.de cpl-cli
|
|
|
|
- name: Install deps
|
|
run: cpl i
|
|
|
|
- name: Build docker
|
|
run: |
|
|
docker stack rm service_observer
|
|
docker image prune -f
|
|
cpl docker-build
|
|
|
|
- name: Deploy Stack to sh-edraft.de
|
|
uses: https://github.com/kgierke/portainer-stack-deployment@v1
|
|
with:
|
|
portainer-url: "https://docker.sh-edraft.de"
|
|
portainer-username: "gitea_job"
|
|
portainer-password: "${{ secrets.docker_job }}"
|
|
portainer-endpoint: 2
|
|
name: service_observer
|
|
file: ./docker-compose.yml
|
|
variables: '{}'
|