Skip to content

Add Slack classification and GHA for scheduled runs #2

Add Slack classification and GHA for scheduled runs

Add Slack classification and GHA for scheduled runs #2

name: Send Slack Metrics
on:
schedule:
- cron: "*/5 * * * *"

Check failure on line 5 in .github/workflows/send-slack-metrics.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/send-slack-metrics.yml

Invalid workflow file

You have an error in your yaml syntax on line 5
branches:
- prod
jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: production
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Configure SSH
run: |
mkdir -p ~/.ssh/
echo "$PROD_SSH_KEY" > ~/.ssh/hubgpt_prod.key
chmod 600 ~/.ssh/hubgpt_prod.key
cat >>~/.ssh/config <<END
Host prod
HostName $PROD_EC2_HOST_IP
User $PROD_EC2_USER
IdentityFile ~/.ssh/hubgpt_prod.key
StrictHostKeyChecking no
END
env:
PROD_EC2_USER: ${{ secrets.PROD_EC2_USER }}
PROD_SSH_KEY: ${{ secrets.PROD_SSH_KEY }}
PROD_EC2_HOST_IP: ${{ secrets.PROD_EC2_HOST_IP }}
- name: Trigger metric dispatch
run: |
ssh prod << 'EOF'
cd danswer
make send-slack-metrics
EOF