Get Started
8 Deploy to Production

Step 8 - Deploy to Production

Run the deploy command

You can use the command line to push your integrations to production once you are ready.

💡

Consider using a separate terminal window so you can continue to run your dev server.

npm run deploy

If all goes well, you should see something like this

CLI: [INFO]: Deploying to prod
CLI: [INFO]: Successful build
Server: [INFO]: Publishing lambda
Server: [INFO]: Deploying helloWorld, basicWebhook, helloSlack, githubWebhook, githubToSlack
Server: [INFO]: Deploy succeeded
Server: [INFO]: Evaluated all subscribeProps
Server: [INFO]: Skipping subscribe for webhooks that need configuration: githubWebhook
Deploy succeeded! 🚀

Verify the deploy worked

In order to verify that the deploy worked, return to your dashboard (opens in a new tab) and switch to your production environment

Lightyear Logo
Environment
Development
Apps
Actions
Webhooks
Runs
Deploys
Account
Docs
Apps
GitHub Icon
GitHub
github
Available
Slack Icon
Slack
slack
Authorized

and you should be able to see all the actions.

Lightyear Logo
Environment
Production
Apps
Actions
Webhooks
Runs
Deploys
Account
Docs
Actions
githubToSlack
manual
GitHub to Slack
Needs setup
Slack Icon
helloSlack
manual
Hello Slack
Needs setup
Slack Icon
helloWorld
manual
Hello World
Ready

Click the GitHub to Slack action

Lightyear Logo
Environment
Production
Apps
Actions
Webhooks
Runs
Deploys
Account
Docs
Actions
githubToSlack
manual
GitHub to Slack
Needs setup
Slack Icon
helloSlack
manual
Hello Slack
Needs setup
Slack Icon
helloWorld
manual
Hello World
Ready

Fill in a value for the channel variable. Now you may be wondering, why do I have to do this again? The answer is that you will often want different values for variables in the production environment than you do for the development environment. Try choosing a different channel than you used in the previous step.

Lightyear Logo
Environment
Production
Apps
Actions
Webhooks
Runs
Deploys
Account
Docs
githubToSlack
GitHub to Slack
Ready
Config
Runs
Config
Apps
Slack Icon
Slack
Authorized
Variables
Name
Value
channel *
Secrets
No secrets

Now go to the webhooks menu and select the GitHub Webhook webhook.

Lightyear Logo
Environment
Production
Apps
Actions
Webhooks
Runs
Deploys
Account
Docs
Webhooks
Basic Webhook
basicWebhook
No actions
GitHub Webhook
githubWebhook
GitHub to Slack
GitHub Icon

Configure the variables

Lightyear Logo
Environment
Production
Apps
Actions
Webhooks
Runs
Deploys
Account
Docs
githubWebhook
GitHub Webhook
Needs setup
https://app.runlightyear.com/api/v1/endpoints/4656596c-4682-4eda-a2b3-cbed8bd3e5a3
Config
Subscription
Deliveries
Config
Apps
GitHub Icon
GitHub
Authorized
Variables
Name
Value
owner *
repo *
Secrets
No secrets

Now push a commit to the repo you just specified.

Check out the Deliveries tab to see the webhook data.

Lightyear Logo
Environment
Production
Apps
Actions
Webhooks
Runs
Deploys
Account
Docs
githubWebhook
GitHub Webhook
Ready
https://app.runlightyear.com/api/v1/endpoints/f35bc5d9-9726-4b7d-a483-02c0c994b454
Config
Subscription
Deliveries
Deliveries
Received at
Mar 29, 2023 5:48 AM
b37d5c4f-c4e0-42c1-9004-8f678847d4a0
Received at  
Mar 29, 2023 5:48 AM
b37d5c4f-c4e0-42c1-9004-8f678847d4a0
 [INFO]:
Received POST at /api/v1/endpoints/f35bc5d9-9726-4b7d-a483-02c0c994b454
 [INFO]:
Triggering run on action githubToSlack
 [INFO]:
Success

And check out the Runs tab on the GitHub to Slack action

Lightyear Logo
Environment
Production
Apps
Actions
Webhooks
Runs
Deploys
Account
Docs
githubToSlack
GitHub to Slack
Ready
Config
Runs
Runs
Ran successfully at
Mar 29, 2023 5:48 AM
2e8ecf53-eee6-4585-b071-9c61109d64c3
Run skipped at
Mar 29, 2023 5:48 AM
3f0376f3-6501-4c50-b6a7-93caadf9e2dc
Ran successfully at
Mar 29, 2023 5:48 AM
1ca36006-f703-402f-b1d4-08c2d87c9d96
githubToSlack
Mar 29, 2023 5:48 AM
 [INFO]:
Running action githubToSlack
 [INFO]:
Got a workflow run payload
 [INFO]:
Posted message to Slack

If everything went well, you should see a Slack message in the channel you just configured. The key difference from the previous step is that the action ran in your production environment (i.e. on our servers) and not your local dev server.