Skip to content

front: add explanations feedback #23

front: add explanations feedback

front: add explanations feedback #23

name: Docker build, publish and deploy
on:
push:
branches:
- main
- dev
workflow_dispatch:
inputs:
docker_label:
description: 'Docker image will be pushed to edulint/edulint-web-frontend:<docker_label>. For deploy to dev server use tag dev.'
required: true
default: 'latest'
env:
docker_label: "${{ inputs.docker_label || github.ref == 'refs/heads/main' && 'latest' || 'dev' }}"
jobs:
docker-build-and-publish-image:
# https://github.com/marketplace/actions/build-and-push-docker-images
# We can skip some of the steps.
runs-on: ubuntu-latest
steps:
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v2
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
push: true
tags: edulint/edulint-web-frontend:${{ env.docker_label }}
- name: Sleep to let DockerHub cache expire
run: sleep 10
redeploy-full-stack:
uses: GiraffeReversed/edulint-web/.github/workflows/deploy.yaml@main
needs: docker-build-and-publish-image
secrets:
SSH_HOST: ${{ secrets.SSH_HOST }}
SSH_USERNAME: ${{ secrets.SSH_USERNAME }}
SSH_KEY: ${{ secrets.SSH_KEY }}
SSH_PROD_FOLDER: ${{ secrets.SSH_PROD_FOLDER}}
SSH_DEV_FOLDER: ${{ secrets.SSH_DEV_FOLDER}}
with:
BRANCH: ${{ github.ref_name }}