31 lines
789 B
YAML
31 lines
789 B
YAML
name: Deploy
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: aliyun
|
|
steps:
|
|
- name: Checkout
|
|
uses: "http://8.161.227.145:3000/huanghaosheng/checkout@releases/v4"
|
|
|
|
- name: Install Docker CLI
|
|
run: |
|
|
apk add --no-cache docker-cli docker-cli-compose || \
|
|
apt-get update && apt-get install -y docker.io || \
|
|
{
|
|
# 手动下载 docker CLI
|
|
curl -fsSL https://download.docker.com/linux/static/stable/x86_64/docker-24.0.7.tgz -o docker.tgz
|
|
tar xzf docker.tgz
|
|
mv docker/docker /usr/local/bin/
|
|
rm -rf docker docker.tgz
|
|
}
|
|
|
|
- name: Build and Deploy
|
|
run: |
|
|
chmod +x deploy.sh
|
|
./deploy.sh build
|
|
./deploy.sh restart
|