-
Notifications
You must be signed in to change notification settings - Fork 1
80 lines (77 loc) · 3.29 KB
/
deploy.yml
File metadata and controls
80 lines (77 loc) · 3.29 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Deploy Apps
on:
workflow_dispatch:
inputs:
next:
description: Is it a dev / next release ?
required: true
type: boolean
deploy:
description: Deploy to public website?
required: true
type: boolean
branch:
description: Deploy from which branch ?
required: true
type: string
default: 'main'
jobs:
build:
env:
branch: ${{ inputs.branch }}
stage: ${{ inputs.next == true && 'next' || 'latest' }}
build: ${{ inputs.next == true && 'next' || 'production' }}
ELECTRON_EXTRA_LAUNCH_ARGS: '--disable-gpu'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
ref: ${{ env.branch }}
token: ${{secrets.DONTCODE_ACTIONS_TOKEN}}
- name: Git config user
uses: snow-actions/git-config-user@v1.0.0
with:
name: Dont-code
email: developer@dont-code.net
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
- name: Install
run: |
node common/scripts/install-run-rush.js install
- name: Build
run: |
node common/scripts/install-run-rush.js build-deploy-${{ env.stage }}
- name: Prepare files to deploy
run: |
mkdir -p ./to-deploy/${{env.stage}}
mv ./dist/${{env.stage}}/plugin-tester/browser ./to-deploy/${{env.stage}}
mv ./to-deploy/${{env.stage}}/browser ./to-deploy/${{env.stage}}/plugin-tester
mv ./dist/${{env.stage}}/host/browser ./to-deploy/${{env.stage}}
mv ./to-deploy/${{env.stage}}/browser ./to-deploy/${{env.stage}}/host
mv ./dist/${{env.stage}}/sample-plugin/browser ./to-deploy/${{env.stage}}
mv ./to-deploy/${{env.stage}}/browser ./to-deploy/${{env.stage}}/sample-plugin
mv ./dist/${{env.stage}}/default-plugin/browser ./to-deploy/${{env.stage}}
mv ./to-deploy/${{env.stage}}/browser ./to-deploy/${{env.stage}}/default-plugin
mv ./dist/${{env.stage}}/intl-plugin/browser ./to-deploy/${{env.stage}}
mv ./to-deploy/${{env.stage}}/browser ./to-deploy/${{env.stage}}/intl-plugin
mv ./dist/${{env.stage}}/web-plugin/browser ./to-deploy/${{env.stage}}
mv ./to-deploy/${{env.stage}}/browser ./to-deploy/${{env.stage}}/web-plugin
mv ./dist/${{env.stage}}/finance-plugin/browser ./to-deploy/${{env.stage}}
mv ./to-deploy/${{env.stage}}/browser ./to-deploy/${{env.stage}}/finance-plugin
mv ./dist/${{env.stage}}/agenda-plugin/browser ./to-deploy/${{env.stage}}
mv ./to-deploy/${{env.stage}}/browser ./to-deploy/${{env.stage}}/agenda-plugin
- name: Deploy to test.dont-code.net apps with ${{env.stage}}
if: inputs.deploy == true
uses: wlixcc/SFTP-Deploy-Action@v1.2.6
with:
username: ${{secrets.DONTCODE_APPS_WEBSITE_USER}}
password: ${{secrets.DONTCODE_APPS_WEBSITE_PASSWORD}}
local_path: './to-deploy/${{env.stage}}/*'
remote_path: '/www/${{env.stage}}'
server: 'test.${{secrets.DONTCODE_WEBSITE_HOST}}'
port: ${{secrets.DONTCODE_WEBSITE_SSH_PORT}}
sftp_only: 'true'
delete_remote_files: 'false'