From 458fc9a4e1e24911e1df3ef75065cb2b33a37a09 Mon Sep 17 00:00:00 2001 From: Joshua King Date: Sun, 26 Apr 2026 11:51:31 -0400 Subject: [PATCH] add dev workflow for building and deploying backend and frontend --- .gitea/workflows/dev.yml | 50 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .gitea/workflows/dev.yml diff --git a/.gitea/workflows/dev.yml b/.gitea/workflows/dev.yml new file mode 100644 index 0000000..393cce2 --- /dev/null +++ b/.gitea/workflows/dev.yml @@ -0,0 +1,50 @@ +name: Dev Build + +on: + pull_request: + branches: [dev] + push: + branches: [dev] + +jobs: + build-test: + runs-on: ubuntu-dotnet + + steps: + - uses: actions/checkout@v4 + + - name: Restore backend + run: dotnet restore + + - name: Build backend + run: dotnet build --no-restore --configuration Release + + - name: Test backend + run: dotnet test --no-build --configuration Release + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: "24" + + - name: Install frontend deps + run: npm ci + working-directory: ./frontend + + - name: Build frontend + run: npm run build + working-directory: ./frontend + + deploy-dev: + needs: build-test + if: gitea.event_name == 'push' + runs-on: ubuntu-latest + + steps: + - name: Deploy dev + run: | + echo "${{ secrets.DEV_DEPLOY_SSH_KEY }}" > /tmp/dev_key + chmod 600 /tmp/dev_key + ssh -i /tmp/dev_key -o StrictHostKeyChecking=no \ + ${{ secrets.DEV_DEPLOY_USER }}@${{ secrets.DEV_DEPLOY_HOST }} \ + "${{ secrets.DEV_DEPLOY_PATH }}/deploy.sh" \ No newline at end of file