This repository was archived by the owner on Jun 24, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (42 loc) · 1.46 KB
/
Copy pathdeploy.yml
File metadata and controls
49 lines (42 loc) · 1.46 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
49
name: Deploy
# This deploy action only generates a new documentation build on the target server.
# You should really consider using a more robust deployment strategy, like Teleport with Docker.
on:
workflow_dispatch:
workflow_run:
workflows: [Release]
types:
- completed
jobs:
deploy:
runs-on: ubuntu-latest
# Only continue if the workflow run was successful
# Subsequent jobs will not run if this job fails,
# because of the `needs` parameters in the other jobs.
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v3
- name: Copy repository contents via scp
uses: appleboy/scp-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
passphrase: ${{ secrets.SSH_PASSPHRASE }}
port: ${{ secrets.SSH_PORT }}
source: "."
target: "/var/www/@rhidium/core"
- name: Deploy to Production
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
passphrase: ${{ secrets.SSH_PASSPHRASE }}
port: ${{ secrets.SSH_PORT }}
script: |
export NVM_DIR=~/.nvm
source ~/.nvm/nvm.sh
cd /var/www/@rhidium/core
npm ci
npm run docs