forked from purefinance/pure.finance
-
Notifications
You must be signed in to change notification settings - Fork 5
41 lines (39 loc) · 1.32 KB
/
hostinger-deployment.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Hostinger Deployment
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: bloq/actions/notify-deploy-to-slack@v1
with:
app-name: Hemi Pure Finance
environment: production
reference: ${{ github.event.head_commit.message }}
slack-mention: ${{ vars.SLACK_MENTION }}
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
status: 'started :stopwatch:'
- uses: actions/checkout@v4
- uses: bloq/actions/setup-node-env@v1
- run: npm run build
- uses: appleboy/scp-action@master
with:
host: ${{ secrets.HOSTINGER_HOST }}
username: ${{ secrets.HOSTINGER_USER }}
port: ${{ secrets.HOSTINGER_PORT }}
key: ${{ secrets.HOSTINGER_SSH_KEY }}
source: site/out/*
target: public_html/pure.finance
rm: true
strip_components: 2
- if: ${{ !cancelled() }}
uses: bloq/actions/notify-deploy-to-slack@v1
with:
app-name: Hemi Pure Finance
environment: production
slack-mention: ${{ vars.SLACK_MENTION }}
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
status: ${{ job.status == 'failure' && 'failed :boom:' || 'finished :ok:' }}