-
-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (29 loc) · 1.1 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
name: deploy
on:
push:
branches:
- release/prd
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected]
with:
node-version: "14"
- name: Installing npm modules...
run: npm install
# - name: Decrypting secrets with gpg...
# run: |
# echo "${{ secrets.GPG_PASSPHRASE }}" | sudo gpg --batch --passphrase-fd 0 --output ".env.prd" --decrypt ".env.prd.gpg"
- name: Building...
run: npm run build-prd
- name: Deploying...
run: |
mkdir -p ~/.ssh/
echo "${{ secrets.CONOHA_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh -oStrictHostKeyChecking=no -i ~/.ssh/id_rsa ${{ secrets.CONOHA_USERNAME }}@${{ secrets.CONOHA_HOST }} -p ${{ secrets.CONOHA_PORT }} rm -rf public_html/mirumi.in/apps/yourcat/*
ls -lha dist/
scp -r -i ~/.ssh/id_rsa -P ${{ secrets.CONOHA_PORT }} dist/* ${{ secrets.CONOHA_USERNAME }}@${{ secrets.CONOHA_HOST }}:public_html/mirumi.in/apps/yourcat/