File tree Expand file tree Collapse file tree 2 files changed +59
-0
lines changed
Expand file tree Collapse file tree 2 files changed +59
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy AI Org Chart Builder Demo
2+
3+ on :
4+ push :
5+ branches : [ main, next ]
6+
7+ jobs :
8+ build-and-deploy :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - name : Checkout Code
12+ uses : actions/checkout@v4
13+
14+ - name : Setup Node.js
15+ uses : actions/setup-node@v4
16+ with :
17+ node-version : ' 18'
18+ cache : ' npm'
19+
20+ - name : Install Dependencies
21+ run : npm install
22+
23+ - name : Set up Docker Buildx
24+ uses : docker/setup-buildx-action@v3
25+
26+ - name : Login to Custom Registry
27+ uses : docker/login-action@v3
28+ with :
29+ registry : ${{ secrets.CUSTOM_REGISTRY_URL }}
30+ username : ${{ secrets.REGISTRY_USERNAME }}
31+ password : ${{ secrets.REGISTRY_TOKEN }}
32+
33+ - name : Build and Push Docker Image
34+ uses : docker/build-push-action@v6
35+ with :
36+ context : .
37+ file : Dockerfile
38+ push : true
39+ tags : ${{ secrets.CUSTOM_REGISTRY_URL }}/ai-org-chart-builder:${{ github.ref_name }}
40+
41+ - name : Trigger Server Restart Webhook
42+ run : |
43+ if [ "${{ github.ref_name }}" = "main" ]; then
44+ curl -X POST "${{ secrets.WEBHOOK_URL_MAIN }}"
45+ elif [ "${{ github.ref_name }}" = "next" ]; then
46+ curl -X POST "${{ secrets.WEBHOOK_URL_NEXT }}"
47+ fi
Original file line number Diff line number Diff line change 1+ FROM node:16-slim
2+
3+ WORKDIR /app
4+
5+ COPY package.json package-lock.json ./
6+ RUN npm install --production && npm cache clean --force
7+
8+ COPY . .
9+
10+ EXPOSE 3001
11+
12+ CMD ["npm" , "start" ]
You can’t perform that action at this time.
0 commit comments