@@ -0,0 +1,33 @@
|
||||
name: Build and Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Login to registry
|
||||
run: |
|
||||
echo "${{ secrets.GIT_PASS }}" | \
|
||||
docker login git.ada-dev.ru -u ${{ secrets.GIT_USER }} --password-stdin
|
||||
|
||||
- name: Build and push
|
||||
run: |
|
||||
docker build -t git.ada-dev.ru/${{ gitea.repository }}:latest .
|
||||
docker push git.ada-dev.ru/${{ gitea.repository }}:latest
|
||||
|
||||
- name: Deploy container
|
||||
run: |
|
||||
docker stop ada-dev-ru 2>/dev/null || true
|
||||
docker rm ada-dev-ru 2>/dev/null || true
|
||||
docker run -d \
|
||||
--name ada-dev-ru \
|
||||
--restart unless-stopped \
|
||||
-p 8081:80 \
|
||||
git.ada-dev.ru/${{ gitea.repository }}:latest
|
||||
Reference in New Issue
Block a user