Skip to content

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.

@shawnhooper
Copy link
Contributor Author

Thanks @mehrancodes !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Slack Integration

2 participants