Skip to content

Saliovin is building bd0e8796401bc53e0656e019873707a3b22facea #5

Saliovin is building bd0e8796401bc53e0656e019873707a3b22facea

Saliovin is building bd0e8796401bc53e0656e019873707a3b22facea #5

Workflow file for this run

name: Deploy
run-name: ${{ github.actor }} is building ${{ github.sha }}
on:
push:
branches:
- main
workflow_dispatch:
jobs:
Deploy:
runs-on: ubuntu-latest
steps:
- name: "Checkout GitHub Action"
uses: actions/checkout@v4
- name: "Login to GitHub Container Registry"
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- name: "Build and Push Image"
run: |
docker build -t typetoast/frontend --build-arg NEXT_PUBLIC_API_KEY=${{secrets.NEXT_PUBLIC_API_KEY}} \
--build-arg NEXT_PUBLIC_AUTH_DOMAIN=${{secrets.NEXT_PUBLIC_AUTH_DOMAIN}} \
--build-arg NEXT_PUBLIC_PROJECT_ID=${{secrets.NEXT_PUBLIC_PROJECT_ID}} \
--build-arg NEXT_PUBLIC_STORAGE_BUCKET=${{secrets.NEXT_PUBLIC_STORAGE_BUCKET}} \
--build-arg NEXT_PUBLIC_MESSAGING_SENDER_ID=${{secrets.NEXT_PUBLIC_MESSAGING_SENDER_ID}} \
--build-arg NEXT_PUBLIC_APP_ID=${{secrets.NEXT_PUBLIC_APP_ID}} \
--build-arg NEXT_PUBLIC_MEASUREMENT_ID=${{secrets.NEXT_PUBLIC_MEASUREMENT_ID}} .
docker tag typetoast/frontend:latest ghcr.io/saliovin/typetoast/frontend:latest
docker push ghcr.io/saliovin/typetoast/frontend:latest
- name: Restarting Docker Compose Through SSH
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
script: sudo docker compose pull typetoast-frontend && sudo docker compose up -d --remove-orphans