fix: force rebuild after disk cleanup #78
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: Build and Deploy Webuigarnet | |
| on: | |
| push: | |
| branches: | |
| - feature-button-i | |
| jobs: | |
| build-webui: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| run: | | |
| git clone --branch feature-button-i \ | |
| https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/enclaive/garnet.git . | |
| - name: Login to Harbor | |
| run: | | |
| echo "${{ secrets.HARBOR_PASSWORD }}" | docker login harbor.enclaive.cloud \ | |
| -u "${{ secrets.HARBOR_USERNAME }}" --password-stdin | |
| - name: Build and push webui image | |
| run: | | |
| SHA=${{ github.sha }} | |
| docker build --no-cache \ | |
| -t harbor.enclaive.cloud/garnetdemo/garnet-webui:latest \ | |
| -t harbor.enclaive.cloud/garnetdemo/garnet-webui:$SHA \ | |
| . | |
| docker push harbor.enclaive.cloud/garnetdemo/garnet-webui:latest | |
| docker push harbor.enclaive.cloud/garnetdemo/garnet-webui:$SHA | |
| deploy-webui: | |
| needs: build-webui | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy via SSH | |
| run: | | |
| mkdir -p ~/.ssh | |
| echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa | |
| chmod 600 ~/.ssh/id_rsa | |
| ssh-keyscan 65.108.38.50 >> ~/.ssh/known_hosts | |
| ssh root@65.108.38.50 " | |
| cd /opt/garnet && | |
| docker compose pull open-webui && | |
| docker compose up -d --force-recreate open-webui | |
| " | |