-
Notifications
You must be signed in to change notification settings - Fork 1.9k
42 lines (41 loc) · 1.3 KB
/
deploy-repo.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
38
39
40
41
42
name: Deploy natives
on:
push:
branches:
- publish
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-20.04
name: Build & Deploy
steps:
- uses: actions/checkout@v2
with:
path: './'
fetch-depth: 2
- uses: actions/setup-node@v2
with:
node-version: '12' # while 14+ technically works, it's 25-50x slower at running native-doc-tooling
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.NATIVE_DEPLOY_KEY }}
known_hosts: ${{ secrets.NATIVE_DEPLOY_KNOWN_HOSTS }}
- name: Acquire latest compat file
env:
NATIVE_DEPLOY_URL: ${{ secrets.NATIVE_DEPLOY_URL }}
run: |
mkdir ./in
. ./.ci/config.sh
rsync -q --ignore-missing-args $NATIVE_DEPLOY_URL/$CONFIG_UPLOAD_COMPAT_FILE.lua ./in/$CONFIG_UPLOAD_COMPAT_FILE.lua
- name: Run build
run: |
set -xe
bash ./.ci/setup-builder
bash ./.ci/run-deploy
- name: Deploy
env:
NATIVE_DEPLOY_URL: ${{ secrets.NATIVE_DEPLOY_URL }}
run: |
rsync -rq --exclude=*compat.lua* ./out/ $NATIVE_DEPLOY_URL
rsync -rqb --backup-dir=./ --suffix=.bak --include=*compat.lua --exclude=* ./out/ $NATIVE_DEPLOY_URL