|
@@ -0,0 +1,24 @@
|
|
|
+name: AutoDeploy For Front
|
|
|
+
|
|
|
+on:
|
|
|
+ push:
|
|
|
+ branches:
|
|
|
+ - dev
|
|
|
+ - master
|
|
|
+
|
|
|
+jobs:
|
|
|
+ deploy_dev:
|
|
|
+ name: "Деплой на машину 🔨"
|
|
|
+ runs-on: ubuntu-latest
|
|
|
+ steps:
|
|
|
+ - uses: actions/checkout@v4
|
|
|
+
|
|
|
+ - name: Send Telegram Message
|
|
|
+ run: |
|
|
|
+ curl \
|
|
|
+ --data-urlencode 'chat_id=${{ secrets.TELEGRAM_CHAT_ID }}' \
|
|
|
+ --data-urlencode 'message_thread_id=${{ secrets.TELEGRAM_MESSAGE_THREAD_ID }}' \
|
|
|
+ --data-urlencode 'link_preview_options={"url":"${{ github.event.head_commit.url }}"}' \
|
|
|
+ --data-urlencode 'parse_mode=markdownv2' \
|
|
|
+ --data-urlencode $'text=🔨 *Frontend push* 🔨\n\n>${{ github.event.head_commit.message }}\n_by [${{ github.actor }}](https://github.com/${{ github.actor }})_ at `${{ github.ref_name }}`\n\n[commit link](${{ github.event.head_commit.url }})' \
|
|
|
+ curl "https://api.telegram.org/bot${{ secrets.TELEGRAM_TOKEN }}/sendMessage"
|