From 7425218c2071e68e3a893966e3298a93f5c994fa Mon Sep 17 00:00:00 2001
From: b <>
Date: Mon, 17 Mar 2025 21:48:03 +0000
Subject: [PATCH] feat: pipeline

---
 .gitea/workflows/pr-staging.yaml         | 31 ++++++++++++++++++++
 .gitea/workflows/release-production.yaml | 37 ++++++++++++++++++++++++
 .gitea/workflows/release-staging.yaml    | 37 ++++++++++++++++++++++++
 index.html                               |  1 +
 4 files changed, 106 insertions(+)
 create mode 100644 .gitea/workflows/pr-staging.yaml
 create mode 100644 .gitea/workflows/release-production.yaml
 create mode 100644 .gitea/workflows/release-staging.yaml
 create mode 100644 index.html

diff --git a/.gitea/workflows/pr-staging.yaml b/.gitea/workflows/pr-staging.yaml
new file mode 100644
index 0000000..4049bc1
--- /dev/null
+++ b/.gitea/workflows/pr-staging.yaml
@@ -0,0 +1,31 @@
+name: Open PR on Staging
+on:
+  pull_request:
+    types: [opened, edited, synchronize]
+    branches:
+      - staging
+
+jobs:
+  build_and_release:
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v3
+
+      - name: Setup Node
+        uses: actions/setup-node@v2
+        with:
+          node-version: 18
+
+      - name: Create .env File
+        run: echo "GATSBY_TELEMETRY_DISABLED=${{ vars.GATSBY_TELEMETRY_DISABLED }}" > .env
+
+      - name: Install Dependencies
+        run: npm ci --omit=dev
+
+      - name: Clean Gatsby cache
+        run: npm run clean
+
+      - name: Create Build
+        run: npm run build
diff --git a/.gitea/workflows/release-production.yaml b/.gitea/workflows/release-production.yaml
new file mode 100644
index 0000000..d486ed1
--- /dev/null
+++ b/.gitea/workflows/release-production.yaml
@@ -0,0 +1,37 @@
+name: Release to Staging
+on:
+  push:
+    branches:
+      - main
+
+jobs:
+  build_and_release:
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v3
+
+      - name: Setup Node
+        uses: actions/setup-node@v2
+        with:
+          node-version: 18
+
+      - name: Create .env File
+        run: echo "GATSBY_TELEMETRY_DISABLED=${{ vars.GATSBY_TELEMETRY_DISABLED }}" > .env
+
+      - name: Install Dependencies
+        run: npm ci --omit=dev
+
+      - name: Clean Gatsby cache
+        run: npm run clean
+
+      - name: Create Build
+        run: npm run build
+
+      - name: Release Build
+        run: |
+          npm -g install cloudron-surfer
+          surfer config --token ${{ secrets.PRODUCTION_CLOUDRON_SURFER_TOKEN }} --server cs-web.nostrdev.com
+          surfer put public/* / --all -d
+          surfer put public/.well-known / --all
diff --git a/.gitea/workflows/release-staging.yaml b/.gitea/workflows/release-staging.yaml
new file mode 100644
index 0000000..1482964
--- /dev/null
+++ b/.gitea/workflows/release-staging.yaml
@@ -0,0 +1,37 @@
+name: Release to Staging
+on:
+  push:
+    branches:
+      - staging
+
+jobs:
+  build_and_release:
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v3
+
+      - name: Setup Node
+        uses: actions/setup-node@v2
+        with:
+          node-version: 18
+
+      - name: Create .env File
+        run: echo "GATSBY_TELEMETRY_DISABLED=${{ vars.GATSBY_TELEMETRY_DISABLED }}" > .env
+
+      - name: Install Dependencies
+        run: npm ci --omit=dev
+
+      - name: Clean Gatsby cache
+        run: npm run clean
+
+      - name: Create Build
+        run: npm run build
+
+      - name: Release Build
+        run: |
+          npm -g install cloudron-surfer
+          surfer config --token ${{ secrets.STAGING_CLOUDRON_SURFER_TOKEN }} --server cs-web.nostrdev.com
+          surfer put public/* / --all -d
+          surfer put public/.well-known / --all
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..3814de3
--- /dev/null
+++ b/index.html
@@ -0,0 +1 @@
+hello (wine) world