-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (49 loc) · 1.26 KB
/
build.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
43
44
45
46
47
48
49
50
51
name: Build
on: [push]
permissions:
actions: read
contents: read
jobs:
buildDeploy:
environment: build
runs-on: ubuntu-latest
name: Build Deploy
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Build deploy
run: bash prepare_viz_deploy.sh
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: deploy
path: deploy.zip
if-no-files-found: error
- name: Check build
run: python paper/viz/script/check_deploy.py deploy
deploy:
environment: deploy
name: Deploy
runs-on: ubuntu-latest
needs: [buildDeploy]
if: github.ref == 'refs/heads/main'
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: deploy
- name: Unzip
run: unzip deploy.zip
- name: Deploy
uses: Creepios/sftp-action@v1.0.3
with:
host: ${{ secrets.SFTPHOST }}
port: 22
username: ${{ secrets.SFTPUSER }}
password: ${{ secrets.SFTPPASSWORD }}
localPath: './deploy'
remotePath: './ag-adaptation-study.pub'