mirror of
https://github.com/fastapi-admin/fastapi-admin.git
synced 2026-03-13 10:32:25 +08:00
33 lines
806 B
YAML
33 lines
806 B
YAML
name: deploy
|
|
on:
|
|
push:
|
|
branches:
|
|
- "dev"
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Build and Publish
|
|
uses: VaultVulp/gp-docker-action@1.2.0
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
image-name: fastapi-admin
|
|
custom-args: --platform=linux/arm64,linux/amd64
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
needs:
|
|
- build
|
|
steps:
|
|
- name: Deploy
|
|
uses: appleboy/ssh-action@master
|
|
with:
|
|
host: ${{ secrets.HOST }}
|
|
username: ${{ secrets.USERNAME }}
|
|
key: ${{ secrets.KEY }}
|
|
port: ${{ secrets.PORT }}
|
|
script: |
|
|
cd /root/docker/fastapi-admin/
|
|
docker compose pull
|
|
docker compose up -d
|