test: main deploy
This commit is contained in:
14
.github/workflows/deploy.yml
vendored
14
.github/workflows/deploy.yml
vendored
@@ -5,8 +5,8 @@ on:
|
||||
branches: [ "main" ]
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
REGISTRY: gitea.sashabayda.ca
|
||||
IMAGE_NAME: ${{ gitea.repository }}
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
@@ -23,8 +23,8 @@ jobs:
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
username: ${{ gitea.actor }}
|
||||
password: ${{ secrets.GITEA_TOKEN }}
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
@@ -55,10 +55,10 @@ jobs:
|
||||
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
script: |
|
||||
# Login to registry
|
||||
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
||||
echo ${{ secrets.GITEA_TOKEN }} | docker login gitea.sashabayda.ca -u ${{ gitea.actor }} --password-stdin
|
||||
|
||||
# Pull new image
|
||||
docker pull ghcr.io/${{ env.IMAGE_NAME }}:latest
|
||||
docker pull gitea.sashabayda.ca/${{ gitea.repository }}:latest
|
||||
|
||||
# Stop and remove existing container
|
||||
docker stop resume-frontend || true
|
||||
@@ -69,7 +69,7 @@ jobs:
|
||||
--name resume-frontend \
|
||||
--restart unless-stopped \
|
||||
-p 80:80 \
|
||||
ghcr.io/${{ env.IMAGE_NAME }}:latest
|
||||
gitea.sashabayda.ca/${{ gitea.repository }}:latest
|
||||
|
||||
# Cleanup unused images
|
||||
docker image prune -f
|
||||
|
||||
Reference in New Issue
Block a user