Compare commits
18
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a2a3a113ee | ||
|
|
614d6063ec | ||
|
|
728b7a9f97 | ||
|
|
59652c0341 | ||
|
|
c9301f5b92 | ||
|
|
5a220c0f9b | ||
|
|
1feb154cba | ||
|
|
f373041ca4 | ||
|
|
dbbbb66a36 | ||
|
|
94a548ec42 | ||
|
|
239d644e00 | ||
|
|
fbba4c9e3c | ||
|
|
9075071157 | ||
|
|
56b616d789 | ||
|
|
e6e8f4dcb1 | ||
|
|
61a0fde869 | ||
|
|
460700bf8c | ||
|
|
b108bb26b8 |
No files matched your search
@@ -0,0 +1,14 @@
|
||||
name: Cleanup Staging on Merge
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [closed]
|
||||
|
||||
jobs:
|
||||
cleanup:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Stop Staging Container
|
||||
run: |
|
||||
docker rm -f fbird-staging || true
|
||||
echo "Staging container stopped"
|
||||
@@ -1,15 +1,12 @@
|
||||
name: fbird CI
|
||||
name: Test and Stage Pull Request
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main", "master" ]
|
||||
pull_request:
|
||||
branches: [ "main", "master" ]
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
stage:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
@@ -1,16 +1,14 @@
|
||||
name: Stop Staging Environment
|
||||
name: "Staging: Stop / Teardown"
|
||||
|
||||
# Allows you to trigger this manually from the Gitea UI
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
stop-staging:
|
||||
stop:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Stop and Remove Staging Container
|
||||
run: |
|
||||
echo "Tearing down staging container..."
|
||||
docker rm -f fbird-staging || true
|
||||
echo "Staging environment stopped successfully!"
|
||||
echo "Stopping staging environment..."
|
||||
docker rm -f fbird-staging || echo "Container fbird-staging was not running."
|
||||
echo "Staging environment stopped successfully."
|
||||
@@ -0,0 +1,45 @@
|
||||
name: "Staging: Start / Deploy"
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
environment:
|
||||
description: 'Target environment'
|
||||
required: false
|
||||
default: 'staging'
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
stage:
|
||||
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
|
||||
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"
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
|
||||
<style>
|
||||
/* ==========================================
|
||||
BASE LAYOUT & TYPOGRAPHY
|
||||
BASE LAYOUT & TYPOGRAPHY
|
||||
========================================== */
|
||||
body {
|
||||
margin: 0;
|
||||
|
||||
Reference in new issue
Block a user