-
Notifications
You must be signed in to change notification settings - Fork 8
55 lines (45 loc) · 1.22 KB
/
bash__deploy-nginx.yml
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Deploy Nginx with bash file
on:
push:
branches:
- 'disabled-main'
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
pull_request:
branches:
- 'disabled-main'
workflow_dispatch:
env:
SITE_URL: 'https://nemanjamitic.com'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Print commit id, message and tag
run: |
git show -s --format='%h %s'
echo "github.ref -> {{ github.ref }}"
- name: Set up Node.js and Yarn
uses: actions/setup-node@v4
with:
node-version: '20.12.2'
registry-url: 'https://registry.yarnpkg.com'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build app
run: yarn build
- name: Set up SSH config
id: ssh-foo
uses: invi5H/ssh-action@v1
with:
NAME: arm1
SSH_HOST: ${{ secrets.REMOTE_HOST }}
SSH_USER: ${{ secrets.REMOTE_USERNAME }}
SSH_KEY: ${{ secrets.REMOTE_KEY_ED25519 }}
SSH_PORT: ${{ secrets.REMOTE_PORT }}
- name: Run bash file with yarn
run: yarn deploy:nginx