Skip to content

Commit 9e6ffbe

Browse files
committed
add step to set WebHook of bot
1 parent f6bdbe1 commit 9e6ffbe

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

.github/workflows/deploy.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
- 'src/**'
1010
- 'template.yaml'
1111
- 'samconfig.toml'
12+
- '.github/workflows/deploy.yml'
1213

1314
concurrency:
1415
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
@@ -26,5 +27,12 @@ jobs:
2627
aws-access-key-id: ${{ secrets.AWS_ID }}
2728
aws-secret-access-key: ${{ secrets.AWS_SECRET }}
2829
aws-region: 'eu-central-1'
29-
- run: sam build --use-container
30+
- run: |
31+
sam build --use-container
32+
name: SAM Build
3033
- run: sam deploy --config-file samconfig.toml --no-confirm-changeset --no-fail-on-empty-changeset
34+
name: Deploy to AWS
35+
- run: |
36+
curl https://api.telegram.org/bot${{ secrets.CMDICT_BOT }}/setWebhook?url=${{ secrets.FUNCTION_URL }}
37+
curl https://api.telegram.org/bot${{ secrets.CMDICT_BOT }}/getWebhookInfo
38+
name: Set WebHook of bot to Function URL

cmdict_bot.code-workspace

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
{
88
"name": "Python code",
99
"path": "src"
10+
},
11+
{
12+
"name": "GitHub Actions",
13+
"path": ".github/workflows"
1014
}
1115
],
1216
"settings": {

0 commit comments

Comments
 (0)