From 458fc9a4e1e24911e1df3ef75065cb2b33a37a09 Mon Sep 17 00:00:00 2001 From: Joshua King Date: Sun, 26 Apr 2026 11:51:31 -0400 Subject: [PATCH 1/3] 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 From c3def212208bf4140016ad2df6ab73828380f97d Mon Sep 17 00:00:00 2001 From: Joshua King Date: Sun, 26 Apr 2026 12:52:22 -0400 Subject: [PATCH 2/3] add notifications for Slack on success and failure of dev deployment --- .gitea/workflows/dev.yml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/dev.yml b/.gitea/workflows/dev.yml index 393cce2..65ad3d7 100644 --- a/.gitea/workflows/dev.yml +++ b/.gitea/workflows/dev.yml @@ -47,4 +47,26 @@ jobs: 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 + "${{ secrets.DEV_DEPLOY_PATH }}/deploy.sh" + + notify-success: + needs: [build-test, deploy-dev] + if: success() && gitea.event_name == 'push' + runs-on: ubuntu-latest + steps: + - name: Notify Slack success + run: | + curl -X POST -H 'Content-type: application/json' \ + --data "{\"text\":\"✅ Extrudex dev deployed successfully from dev branch.\"}" \ + "${{ secrets.SLACK_WEBHOOK_URL }}" + + notify-failure: + needs: [build-test, deploy-dev] + if: failure() + runs-on: ubuntu-latest + steps: + - name: Notify Slack failure + run: | + curl -X POST -H 'Content-type: application/json' \ + --data "{\"text\":\"🚨 Extrudex dev pipeline failed. Check Gitea Actions for details.\"}" \ + "${{ secrets.SLACK_WEBHOOK_URL }}" \ No newline at end of file From 4172e21fd15e039e61b24bfa7c72f545b87caff3 Mon Sep 17 00:00:00 2001 From: Joshua King Date: Sun, 26 Apr 2026 12:56:06 -0400 Subject: [PATCH 3/3] update dev workflow to use ubuntu-latest for build-test job Co-authored-by: Copilot --- .gitea/workflows/dev.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/dev.yml b/.gitea/workflows/dev.yml index 65ad3d7..3adde84 100644 --- a/.gitea/workflows/dev.yml +++ b/.gitea/workflows/dev.yml @@ -8,11 +8,16 @@ on: jobs: build-test: - runs-on: ubuntu-dotnet + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '9.0.x' + - name: Restore backend run: dotnet restore