Skip to content

Merge branch 'main' of https://github.com/GLOBUS-studio/GStime-JavaSc… #4

Merge branch 'main' of https://github.com/GLOBUS-studio/GStime-JavaSc…

Merge branch 'main' of https://github.com/GLOBUS-studio/GStime-JavaSc… #4

Workflow file for this run

name: Build and Minify
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
# Удаляем опцию cache, которая вызывает ошибку
# cache: 'npm'
- name: Install dependencies
run: npm install
- name: Minify GStime.js
run: npm run build
- name: Commit minified file
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Build: Minify GStime.js"
file_pattern: 'GStime.min.js'
- name: Send success message to Telegram
if: success()
run: |
curl -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
-d chat_id="${{ secrets.TELEGRAM_CHAT_ID }}" \
-d text="🟢 $GITHUB_REPOSITORY [${{ github.event.pusher.name }}] - OK"
- name: Send error message to Telegram
if: failure()
run: |
curl -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
-d chat_id="${{ secrets.TELEGRAM_CHAT_ID }}" \
-d text="🔴 $GITHUB_REPOSITORY [${{ github.event.pusher.name }}] - ERROR"