Files
fbird/.gitea/workflows/ci.yml
T
jpd b45d324996
fbird CI / build-and-test (push) Successful in 6s
Update .gitea/workflows/ci.yml
2026-09-30 18:10:51 +01:00

43 lines
1.2 KiB
YAML

name: fbird CI
on:
push:
branches: [ "main", "master" ]
pull_request:
branches: [ "main", "master" ]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Verify Project Structure
run: |
echo "Checking repository files..."
ls -la
if [ ! -f "index.html" ] && [ ! -f "fbird.html" ]; then
echo "Error: Web HTML file missing!"
exit 1
fi
echo "Project structure verified successfully."
- name: Deploy Staging Preview
run: |
echo "Updating staging environment..."
# 1. Remove old staging container if it exists
docker rm -f fbird-staging || true
# 2. Start fresh Nginx container (no volume mounts needed)
docker run -d \
--name fbird-staging \
--restart always \
-p 8181:80 \
nginx:alpine
# 3. Copy repo contents directly into the Nginx web root
docker cp . fbird-staging:/usr/share/nginx/html/
echo "Staging deployed! Visit http://192.168.183.100:8181"