From 6152b895bccff8393f36b93e58a86153113d160f Mon Sep 17 00:00:00 2001 From: daniyal Date: Fri, 16 Aug 2024 11:15:53 +0500 Subject: [PATCH] chore: add production release workflow --- .gitea/workflows/release-production.yaml | 36 ++++++++++++++++++++++++ .gitea/workflows/release-staging.yaml | 2 +- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 .gitea/workflows/release-production.yaml diff --git a/.gitea/workflows/release-production.yaml b/.gitea/workflows/release-production.yaml new file mode 100644 index 0000000..98f33ff --- /dev/null +++ b/.gitea/workflows/release-production.yaml @@ -0,0 +1,36 @@ +name: Release to Staging +on: + push: + branches: + - master + +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 + cat .env + + - 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 www.degmods.com + surfer put dist/* / --all -d diff --git a/.gitea/workflows/release-staging.yaml b/.gitea/workflows/release-staging.yaml index 6e0da5f..78a0e01 100644 --- a/.gitea/workflows/release-staging.yaml +++ b/.gitea/workflows/release-staging.yaml @@ -2,7 +2,7 @@ name: Release to Staging on: push: branches: - - master + - staging jobs: build_and_release: -- 2.34.1