Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Send Slack Notification on Deployment #78

Merged
merged 35 commits into from
Mar 5, 2024

Conversation

shawnhooper
Copy link
Contributor

@shawnhooper shawnhooper commented Mar 3, 2024

Fixes #77

To test this:

  1. Create a new Slack app. Copy it's OAuth Access token.

  2. Create a new GitHub secret with the OAuth Access token.

  3. Invite the Slack app into the channel where you want to announce the deployments.

  4. Add two new environment variables to the preview-provision.yml workflow:

       SLACK_ANNOUNCEMENT_ENABLED: true
       SLACK_BOT_USER_OAUTH_TOKEN: ${{ secrets.SLACK_BOT_USER_OAUTH_TOKEN }}
       SLACK_CHANNEL: "#deployments"  (replace this with the channel you invited the bot to)
    
  5. Test a deployment.

The Slack Notification will only be sent when the site is first created. Subsequent pushes to the same PR won't trigger the notification.

# Conflicts:
#	app/Services/Forge/ForgeSetting.php
#	config/forge.php
@shawnhooper shawnhooper marked this pull request as ready for review March 3, 2024 23:32
@shawnhooper
Copy link
Contributor Author

image

This is proof of it working in my environment

@mehrancodes mehrancodes self-requested a review March 4, 2024 21:00
Copy link
Owner

@mehrancodes mehrancodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks great! 👨🏻‍💻 Thanks @shawnhooper for the great work! Everything works smoothly when I test it manually, too.

@mehrancodes mehrancodes merged commit c69a79e into mehrancodes:main Mar 5, 2024
1 check passed
@shawnhooper
Copy link
Contributor Author

Thanks @mehrancodes !

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Slack Integration
2 participants