-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (38 loc) · 1.05 KB
/
deploy.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
name: "Deploy To Server"
on:
push:
branches: [main, dev]
env:
DOKKU_REPO: "ssh://[email protected]:22/rails-backend"
DOKKU_DEPLOY_BRANCH: "main"
permissions: write-all
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Cloning repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node.js for frontend compilation
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install Yarn
run: npm install -g yarn
- name: Build Frontend
run: |
cd frontend
yarn check --integrity || yarn install
yarn deploy
- name: Dokku
uses: dokku/[email protected]
with:
git_push_flags: '--force'
ssh_private_key: ${{ secrets.SSH_KEY }}
git_remote_url: ${{ env.DOKKU_REPO }}
branch: ${{ env.DOKKU_DEPLOY_BRANCH }}