From f06801d80b8882caa4715064c4f3150cc5cd7ccf Mon Sep 17 00:00:00 2001 From: daniyal Date: Thu, 8 Aug 2024 22:17:51 +0500 Subject: [PATCH] chore: add workflow for deploying to staging --- .gitea/workflows/release-staging.yaml | 35 +++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .gitea/workflows/release-staging.yaml diff --git a/.gitea/workflows/release-staging.yaml b/.gitea/workflows/release-staging.yaml new file mode 100644 index 0000000..a3783f8 --- /dev/null +++ b/.gitea/workflows/release-staging.yaml @@ -0,0 +1,35 @@ +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: Install Dependencies + run: npm ci + + - name: Create .env File + run: | + echo "VITE_APP_RELAY=${{ vars.VITE_APP_RELAY }}" > .env + echo "VITE_ADMIN_NPUBS=${{ vars.VITE_ADMIN_NPUBS }}" > .env + + - 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 dev.degmods.com + surfer put dist/* / --all -d