π·ββοΈ Change CI action to publish to GHCR #46
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: Build UI and publish to GitHub Container Registry | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Build and push Docker image | |
run: | | |
docker login --username sambwagner --password ${{ secrets.GHCR_PAT }} ghcr.io | |
docker build . -t ghcr.io/sambwagner/port-flow:latest | |
docker push ghcr.io/sambwagner/port-flow:latest | |
# - name: Set up SSH key | |
# run: | | |
# mkdir -p ~/.ssh | |
# echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa | |
# chmod 600 ~/.ssh/id_rsa | |
# ssh-keyscan -H "${{ secrets.VPS_IP }}" >> ~/.ssh/known_hosts | |
# - name: Deploy to VPS | |
# run: ssh "${{ secrets.VPS_SSH_LOGIN }}" "cd /var/www/port-flow && ./deploy.sh" |