-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (39 loc) · 1.23 KB
/
deploy.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
on: push
jobs:
build:
name: Build
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17
cache: sbt
- name: Configure SSH
run: |
mkdir -p ~/.ssh/
echo "$SSH_KEY" > ~/.ssh/ga.key
chmod 600 ~/.ssh/ga.key
cat >>~/.ssh/config <<END
Host server
HostName $SSH_HOST
User $SSH_USER
IdentityFile ~/.ssh/ga.key
StrictHostKeyChecking no
END
env:
SSH_USER: ${{ secrets.SSH_USER }}
SSH_KEY: ${{ secrets.SSH_KEY }}
SSH_HOST: ${{ secrets.SSH_HOST }}
- name: Compile
run: sbt "set scalaJSStage in Global := FullOptStage" Test/compile
- name: Build deb packages
run: |
sudo apt-get install -y lintian
sbt "set scalaJSStage in Global := FullOptStage" musicpimp/Debian/packageAndCopy pimpcloud/Debian/packageAndCopy
- name: Deploy pimpcloud
run: |
scp pimpcloud/target/pimpcloud.deb server:/home/mle/pimpcloud.deb
ssh server 'sudo dpkg --force-confold -i /home/mle/pimpcloud.deb'