Skip to content

Commit e958d15

Browse files
committed
feat: add redirect workflow
1 parent dc26801 commit e958d15

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

.github/workflows/redirect.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Redirect
2+
3+
# Controls when the workflow will run
4+
on:
5+
# Allows you to run this workflow manually from the Actions tab
6+
workflow_dispatch:
7+
8+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
9+
jobs:
10+
# This workflow contains a single job called "redirect"
11+
redirect:
12+
if: ${{ github.ref == 'refs/heads/demo' }}
13+
14+
# The type of runner that the job will run on
15+
runs-on: self-hosted
16+
env:
17+
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
18+
19+
# Steps represent a sequence of tasks that will be executed as part of the job
20+
steps:
21+
- name: Get Source
22+
run: |
23+
cd /home/ubuntu
24+
[ -d mrz-scanner-javascript ] && rm -rf mrz-scanner-javascript
25+
git clone --depth 1 -b demo https://github.com/Dynamsoft/mrz-scanner-javascript.git
26+
27+
- name: Sync files
28+
uses: SamKirkland/FTP-Deploy-Action@4.3.0
29+
with:
30+
server: ${{ secrets.FTP_DEMO_SERVER }}
31+
username: ${{ secrets.FTP_DEMO_USERNAME }}
32+
password: ${{ secrets.FTP_DEMO_PASSWORD }}
33+
port: 21
34+
local-dir: /home/ubuntu/mrz-scanner-javascript/link-redirect-config/
35+
server-dir: /Demo.dynamsoft.com/solutions/mrz-scanner/
36+
- name: Sync files
37+
uses: SamKirkland/FTP-Deploy-Action@4.3.0
38+
with:
39+
server: ${{ secrets.FTP_DEMO_SERVER }}
40+
username: ${{ secrets.FTP_DEMO_USERNAME }}
41+
password: ${{ secrets.FTP_DEMO_PASSWORD }}
42+
port: 21
43+
local-dir: /home/ubuntu/mrz-scanner-javascript/link-redirect-config/
44+
server-dir: /Demo.dynamsoft.com/solutions/passport-scanner/

0 commit comments

Comments
 (0)