-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (38 loc) · 1.49 KB
/
staging.yml
File metadata and controls
48 lines (38 loc) · 1.49 KB
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
# This is a basic workflow to help you get started with Actions
name: Staging Deployment
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "staging" branch
push:
branches: ["staging"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
runs-on: ubuntu-latest
env:
ELIXIR_API_BASE_URL: "https://elixir.rocks/api/v1"
steps:
- name: Checkout Files
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "18.4.0"
- name: Install Dependencies
run: yarn install
- name: Create dotenv
uses: iamsauravsharma/create-dotenv@v1.2.1
- name: Build Project
run: yarn build
- name: Deploy with Rsync
uses: burnett01/rsync-deployments@5.2
with:
switches: -avzr --delete
path: dist/
remote_path: /var/lib/docker/volumes/nginx-data/_data
remote_host: ${{ secrets.SSH_HOST }}
remote_user: ${{ secrets.SSH_USER }}
remote_key: ${{ secrets.SSH_PRIVATE_KEY }}
remote_key_pass: ${{ secrets.SSH_PRIVATE_KEY_PASS }}