diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index fee93e3..b8e2fab 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -1,15 +1,37 @@ -- name: Deploy Staging Preview +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..." - # Stop old staging instance if it exists docker rm -f fbird-staging || true - - # Run continuous staging preview docker run -d \ --name fbird-staging \ --restart always \ -v $(pwd):/usr/share/nginx/html:ro \ -p 8181:80 \ nginx:alpine - echo "Staging deployed! Visit http://192.168.183.100:8181" \ No newline at end of file