Update deployment script path in workflow for container deployment #65
This file contains 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: CI-CD | |
on: | |
push: | |
branches: [ "main" ] # or your production branch | |
jobs: | |
build-and-deploy: | |
runs-on: self-hosted | |
# If you named your runner group something else, or labeled it, adjust accordingly | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Set up Docker buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Log in to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.CR_PAT }} | |
- name: Build and push Docker image | |
run: | | |
docker build -t ghcr.io/${{ github.repository }}:latest . | |
docker push ghcr.io/${{ github.repository }}:latest | |
- name: Deploy container using script | |
run: | | |
chmod +x /home/satsur/update-summarizeme.io.sh | |
/home/satsur/update-summarizeme.io.sh |