Skip to content

Commit a4d3b3a

Browse files
committed
ci: add a slack message for docs update
1 parent a67dcb0 commit a4d3b3a

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

.github/workflows/docs-deploy.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,19 @@ jobs:
6060
remote_port: ${{ secrets.DOCS_DEPLOY_PORT }}
6161
remote_user: ${{ secrets.DOCS_DEPLOY_USER }}
6262
remote_key: ${{ secrets.DOCS_DEPLOY_KEY }}
63+
64+
# send a notification at the end
65+
- name: Send notification to lab slack
66+
env:
67+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
68+
if: ${{ env.SLACK_WEBHOOK_URL != '' }} # this should only run if SLACK_WEBHOOK exists
69+
id: slack
70+
uses: slackapi/slack-github-action@v1.25.0
71+
with:
72+
# This data can be any valid JSON from a previous step in the GitHub Action
73+
payload: |
74+
{
75+
"github_username": "${{ github.actor }}",
76+
"deploy_url": "Docs were updated as https://smile.gureckislab.org/",
77+
"github_hash": "https://github.com/${{ steps.dotenv_github.outputs.VITE_GIT_OWNER }}/${{ steps.dotenv_github.outputs.VITE_GIT_REPO_NAME }}/commit/${{ steps.dotenv_github.outputs.VITE_GIT_HASH }}"
78+
}

0 commit comments

Comments
 (0)