Files
ufile/.gitea/workflows/release.yaml
T
loveuer 557ace6150
Build and Deploy / deploy (push) Failing after 2s
ci: merge CLI build into deploy workflow
2026-09-21 01:45:51 -07:00

49 lines
1.2 KiB
YAML

name: Build and Deploy
on:
push:
branches:
- master
jobs:
deploy:
runs-on: tencent-local
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build CLI binaries
run: ./scripts/build-cli.sh
- name: Verify CLI checksums
run: cd dist && sha256sum -c checksums.txt
- name: Build image
run: docker build --build-arg GOPROXY=https://goproxy.cn,direct -t ufile:latest .
- name: Stop old container
run: |
if docker container inspect ufile >/dev/null 2>&1; then
docker stop ufile
fi
- name: Remove old container
run: |
if docker container inspect ufile >/dev/null 2>&1; then
docker rm ufile
fi
- name: Start new container
run: |
mkdir -p /root/deploy/ufile/data
chown -R 10001:10001 /root/deploy/ufile/data
docker run -d \
--name ufile \
--restart unless-stopped \
-p 6616:6616 \
-v /root/deploy/ufile/data:/data \
ufile:latest \
/usr/local/bin/ufile \
--data /data \
--address 0.0.0.0:6616