Skip to content

refactor github actions iteration=5 #225

refactor github actions iteration=5

refactor github actions iteration=5 #225

name: Frontend Production Deployment
on:
push:
branches:
- master
paths:
- "zubhub_frontend/zubhub/**"
- "!zubhub_frontend/zubhub/README.md"
- "!zubhub_frontend/zubhub/.env.example"
- "!zubhub_frontend/zubhub/.prettierrc.yaml"
- "!zubhub_frontend/zubhub/.gitignore"
workflow_dispatch:
jobs:
build:

Check failure on line 16 in .github/workflows/build_deploy_frontend.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build_deploy_frontend.yml

Invalid workflow file

You have an error in your yaml syntax on line 16
runs-on: ubuntu-latest
steps:
uses: unstructuredstudio/zubhub/.github/actions/checkout@master
- name: Build and push frontend
uses: unstructuredstudio/zubhub/.github/actions/docker_build_and_push@master
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
token: ${{ secrets.DOCKERHUB_TOKEN }}
context: ./zubhub_frontend/zubhub/
file: ./zubhub_frontend/zubhub/Dockerfile.prod
push: true
tags: unstructuredstudio/zubhub-frontend:latest
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- uses: unstructuredstudio/zubhub/.github/actions/checkout@master
- uses: unstructuredstudio/zubhub/.github/actions/scp_action@master
with:
host: ${{ secrets.DO_BACKEND_HOST }}
username: ${{ secrets.DO_BACKEND_USERNAME }}
key: ${{ secrets.DO_SSHKEY }}
source: "."
target: "/home/zubhub-frontend/zubhub"
- uses: unstructuredstudio/zubhub/.github/actions/ssh_action@master
with:
host: ${{ secrets.DO_BACKEND_HOST }}
username: ${{ secrets.DO_BACKEND_USERNAME }}
key: ${{ secrets.DO_SSHKEY }}
script: |
cp /home/zubhub-frontend/zubhub/zubhub_frontend/zubhub/deploy_frontend.sh /home/zubhub-frontend/
sudo bash /home/zubhub-frontend/deploy_frontend.sh"