fix: fix type profile-favorites, remove props buttonText product-card #35
Workflow file for this run
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: good_food_frontend workflow | |
on: | |
push: | |
branches: | |
jobs: | |
build_and_push_to_docker_hub: | |
name: Push Docker image to Docker Hub | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main' | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Push frontend to Docker Hub | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: true | |
tags: ${{ secrets.DOCKER_USERNAME }}/good_food_frontend:v.01 | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build_and_push_to_docker_hub | |
steps: | |
- name: executing remote ssh commands to deploy | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.SSH_HOST }} | |
username: ${{ secrets.SSH_USER }} | |
key: ${{ secrets.SSH_KEY }} | |
# passphrase: ${{ secrets.SSH_PASSPHRASE }} | |
script: | | |
echo ${{ secrets.SSH_HOST_USER_PASSWORD }} | sudo -S docker compose stop | |
sudo docker pull ${{ secrets.DOCKER_USERNAME }}/good_food_frontend:v.01 | |
sudo docker compose up -d | |
echo ${{ secrets.SSH_HOST_USER_PASSWORD }} | sudo -S docker image prune -f | |
send_message: | |
runs-on: ubuntu-latest | |
needs: deploy | |
steps: | |
- name: send message | |
uses: appleboy/telegram-action@master | |
with: | |
to: ${{ secrets.TELEGRAM_TO }} | |
token: ${{ secrets.TELEGRAM_TOKEN }} | |
message: | | |
${{ github.workflow }} completed successfully! | |
Repository: ${{ github.repository }}. | |
Branch name: ${{ github.ref_name }}. | |
Commit author: ${{ github.actor }}. | |
Commit message: ${{ github.event.commits[0].message }}. | |
See changes: https://github.com/${{ github.repository }}/commit/${{github.sha}} |