Skip to content

docs: tests documentation for YOLO and Tesseract operators (#47) #14

docs: tests documentation for YOLO and Tesseract operators (#47)

docs: tests documentation for YOLO and Tesseract operators (#47) #14

Workflow file for this run

name: Deploy to Production
on:
push:
branches:
- master
jobs:
changes:
runs-on: ubuntu-latest
outputs:
api: ${{ steps.filter.outputs.api}}
docs: ${{ steps.filter.outputs.docs }}
steps:
- uses: actions/checkout@v2
with:
ref: development
- uses: dorny/[email protected]
id: filter
with:
filters: |
api:
- 'src/api/**/*'
docs:
- 'docs/**/*'
api:
runs-on: ubuntu-latest
needs: changes
if: ${{ needs.changes.outputs.api == 'true' }}
steps:
- uses: actions/checkout@v2
with:
ref: master
- name: Declare some variables
id: vars
shell: bash
run: |
echo "setting variables"
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
pwd
ls
- uses: elgohr/Publish-Docker-Github-Action@master
with:
username: tattletech
password: ${{ secrets.DOCKER_PASSWORD }}
name: tattletech/feluda-server
tags: ${{ steps.vars.outputs.sha_short }}
workdir: src/api/
- name: deploy to cluster
uses: steebchen/[email protected]
with: # defaults to latest kubectl binary version
config: ${{ secrets.PROD_KUBE_CONFIG_DATA }}
command: set image --record deployment/feluda-server feluda-server=tattletech/feluda-server:${{ steps.vars.outputs.sha_short }}
- name: verify deployment
uses: steebchen/[email protected]
with:
config: ${{ secrets.PROD_KUBE_CONFIG_DATA }}
version: v1.21.0 # specify kubectl binary version explicitly
command: rollout status deployment/feluda-server
docs:
runs-on: ubuntu-latest
needs: changes
if: ${{ needs.changes.outputs.docs == 'true' }}
steps:
- uses: actions/checkout@v2
with:
ref: master
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ap-south-1
- name: Install Packages
run: |
cd docs/
npm install --legacy-peer-deps
- name: Build Site
run: |
cd docs/
npm run build
- name: Deploy Site
run: |
cd docs/
npm run deploy
notify:
runs-on: ubuntu-latest
needs: [api, docs]
if: ${{ always() }}
steps:
- name: Notify on Slack
uses: rtCamp/[email protected]
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_MESSAGE: "Deploy Feluda Production"
SLACK_TITLE: "Deploy Feluda Production workflow complete"
SLACK_COLOR: "#020637"
SLACK_ICON: https://tattle-media.s3.amazonaws.com/monogram-dark.svg