This commit is contained in:
@@ -2,7 +2,8 @@ name: CD for Blog
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -21,18 +22,4 @@ jobs:
|
|||||||
context: .
|
context: .
|
||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
push: true
|
push: true
|
||||||
tags: git.skrd.fun/skrd/danielcortes.xyz:latest
|
tags: git.skrd.fun/skrd/danielcortes.xyz:${{github.ref_name}}
|
||||||
|
|
||||||
|
|
||||||
deploy:
|
|
||||||
needs: build
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Deploy
|
|
||||||
run: |
|
|
||||||
echo "${{ secrets.SERVER_PRIVATE_KEY }}" > private_key && chmod 600 private_key
|
|
||||||
ssh -o StrictHostKeyChecking=no -i private_key ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} -p ${{ secrets.SSH_PORT || 22 }} '
|
|
||||||
docker compose pull
|
|
||||||
docker compose up -d
|
|
||||||
'
|
|
||||||
|
|||||||
Reference in New Issue
Block a user