fix name registry2 #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy AI Org Chart Builder Demo | |
| on: | |
| push: | |
| branches: [ main, next, test ] | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| cache: 'npm' | |
| - name: Install Dependencies | |
| run: npm install | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to Custom Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ secrets.CUSTOM_REGISTRY_URL }} | |
| username: ${{ secrets.REGISTRY_USERNAME }} | |
| password: ${{ secrets.REGISTRY_TOKEN }} | |
| - name: Build and Push Docker Image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: Dockerfile | |
| push: true | |
| tags: ${{ secrets.CUSTOM_REGISTRY_URL }}/${USERNAME}/ai-org-chart-builder:${{ github.ref_name }} | |
| - name: Trigger Server Restart Webhook | |
| run: | | |
| if [ "${{ github.ref_name }}" = "main" ]; then | |
| curl -X POST "${{ secrets.WEBHOOK_URL_MAIN }}" | |
| elif [ "${{ github.ref_name }}" = "next" ]; then | |
| curl -X POST "${{ secrets.WEBHOOK_URL_NEXT }}" | |
| elif [ "${{ github.ref_name }}" = "test" ]; then | |
| curl -X POST "${{ secrets.WEBHOOK_URL_NEXT }}" | |
| fi |