feat(ci): add github actions
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
name: Deploy
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
quality:
|
||||
uses: ./.github/workflows/quality.yaml
|
||||
|
||||
deploy:
|
||||
name: deploy
|
||||
needs: [quality]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: execute ssh command
|
||||
uses: appleboy/ssh-action@v1.2.0
|
||||
with:
|
||||
host: ${{ secrets.SSH_HOST }}
|
||||
username: ${{ secrets.SSH_USER }}
|
||||
key: ${{ secrets.SSH_KEY }}
|
||||
port: ${{ secrets.SSH_PORT }}
|
||||
script: |
|
||||
cd /var/www/html/basango.io
|
||||
git pull origin main --rebase
|
||||
bun install --frozen-lockfile
|
||||
curl -X POST "https://api.telegram.org/bot${{ secrets.DEVY_TOKEN }}/sendMessage" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"chat_id": "${{ secrets.DEVY_CHAT_ID }}",
|
||||
"text": "basango.io : `'"$(git rev-parse --short HEAD)"'` has been deployed! 🎉",
|
||||
"parse_mode": "Markdown"
|
||||
}'
|
||||
Reference in New Issue
Block a user