Skip to content

Commit 3e6597d

Browse files
feat: add production deployment workflow
1 parent 2ee90ce commit 3e6597d

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: workflow — trigger production deployment
2+
3+
on:
4+
push:
5+
branches: [master]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
11+
defaults:
12+
run:
13+
working-directory: Applications/Backend
14+
15+
steps:
16+
- name: checkout
17+
uses: actions/checkout@v4
18+
19+
- name: build solution
20+
run: dotnet build HttpsRichardy.Federation.sln
21+
22+
- name: run tests
23+
run: dotnet test HttpsRichardy.Federation.sln
24+
25+
- name: build docker image
26+
run: docker build -t httpsrichardy/federation:latest .
27+
28+
- name: login docker hub
29+
uses: docker/login-action@v3
30+
with:
31+
username: ${{ secrets.DOCKERHUB_USERNAME }}
32+
password: ${{ secrets.DOCKERHUB_TOKEN }}
33+
34+
- name: push docker image
35+
run: docker push httpsrichardy/federation:latest
36+
37+
- name: deploy webhook
38+
run: curl -X POST ${{ secrets.DEPLOY_WEBHOOK_URL }}

0 commit comments

Comments
 (0)