-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (40 loc) · 1.29 KB
/
release_dev.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
name: Deploy Dev to Linode
on:
push:
branches-ignore:
- 'master'
jobs:
deploy_to_linode:
name: Deploy to Linode
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Set branch name as env var
run: echo "BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_ENV
- name: Use branch name
run: echo "The branch name is $BRANCH_NAME"
- name: Execute remote Docker Compose command
uses: appleboy/[email protected]
env:
BRANCH_NAME: ${{ github.head_ref }}
FOO: 'BAR'
with:
host: ${{ secrets.REMOTE_HOST }}
username: ${{ secrets.REMOTE_USERNAME }}
password: ${{ secrets.REMOTE_PASSWORD }}
port: ${{ secrets.REMOTE_PORT }}
envs: BRANCH_NAME
script: |
echo "I am $FOO"
echo "Building branch: $BRANCH_NAME"
source /root/.bashrc
cd /html/derecksnotes-playground/test-derecksnotes.com/
git fetch origin ${{ github.head_ref }}
git checkout ${{ github.head_ref }}
git pull
npm install
npm run build-client
npm run build-server
npm run restart-server-prod
npm run restart-client-prod