Update .gitea/workflows/ci.yml
This commit is contained in:
1 parent
aa888158a6
commit
69cd1834ed
1 file changed
+15
-33
+15
-33
@@ -1,33 +1,15 @@
|
|||||||
name: fbird CI
|
- name: Deploy Staging Preview
|
||||||
|
run:
|
||||||
# Defines when the workflow runs: on every push and pull request to the main branch
|
echo "Updating staging environment..."
|
||||||
on:
|
# Stop old staging instance if it exists
|
||||||
push:
|
docker rm -f fbird-staging || true
|
||||||
branches: [ "main", "master" ]
|
|
||||||
pull_request:
|
# Run continuous staging preview
|
||||||
branches: [ "main", "master" ]
|
docker run -d \
|
||||||
|
--name fbird-staging \
|
||||||
jobs:
|
--restart always \
|
||||||
build-and-test:
|
-v $(pwd):/usr/share/nginx/html:ro \
|
||||||
runs-on: ubuntu-latest
|
-p 8181:80 \
|
||||||
|
nginx:alpine
|
||||||
steps:
|
|
||||||
# 1. Check out your repository code into the runner
|
echo "Staging deployed! Visit http://192.168.183.100:8181"
|
||||||
- name: Checkout Code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
# 2. Verify that your core files exist and are structured correctly
|
|
||||||
- name: Verify Project Structure
|
|
||||||
run: |
|
|
||||||
echo "Checking repository files..."
|
|
||||||
ls -la
|
|
||||||
if [ ! -f "index.html" ]; then
|
|
||||||
echo "Error: index.html missing!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "Project structure verified successfully."
|
|
||||||
|
|
||||||
# 3. Optional: HTML/Syntax validation check (using a lightweight linter or checker)
|
|
||||||
- name: Basic Asset Check
|
|
||||||
run: |
|
|
||||||
echo "Assets look good. Ready for deployment!"
|
|
||||||
Reference in new issue
Block a user