-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
57 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,6 +50,8 @@ val httpGroup = "org.apache.httpcomponents" | |
|
||
ThisBuild / scalaVersion := "2.13.15" | ||
|
||
val packageAndCopy = taskKey[File]("Copies packaged file for convenience") | ||
|
||
val utilAudio = Project("util-audio", file("util-audio")) | ||
.enablePlugins(MavenCentralPlugin) | ||
.settings( | ||
|
@@ -384,8 +386,8 @@ lazy val pimpcloudSettings = | |
) | ||
|
||
lazy val pimpcloudLinuxSettings = Seq( | ||
Linux / httpPort := Option("disabled"), | ||
Linux / httpsPort := Option("8458"), | ||
Linux / httpPort := Option("8458"), | ||
Linux / httpsPort := Option("disabled"), | ||
maintainer := "Michael Skogberg <[email protected]>", | ||
manufacturer := "Skogberg Labs", | ||
mainClass := Some("com.malliina.pimpcloud.Starter"), | ||
|
@@ -447,7 +449,16 @@ def serverSettings = LinusPlugin.playSettings ++ Seq( | |
"org.slf4j" % "slf4j-api" % "1.7.30", | ||
"org.scalameta" %% "munit" % munitVersion % Test | ||
), | ||
testFrameworks += new TestFramework("munit.Framework") | ||
Debian / packageAndCopy := { | ||
val deb = (Debian / packageBin).value | ||
val artifact = (Debian / packageBin).value | ||
val destName = (Linux / name).value | ||
val dest = target.value / s"$destName.deb" | ||
sbt.IO.copyFile(artifact, dest) | ||
streams.value.log.info(s"Copied '$artifact' to '$dest'.") | ||
dest | ||
}, | ||
Debian / packageAndCopy := (Debian / packageAndCopy).dependsOn(Debian / packageBin).value | ||
) | ||
|
||
def libSettings = Seq( | ||
|