Skip to content

Commit eed0eb9

Browse files
authoredSep 4, 2024··
Use custom GitHub action for deployment
1 parent 29f9657 commit eed0eb9

File tree

2 files changed

+54
-76
lines changed

2 files changed

+54
-76
lines changed
 
+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Build and deploy
2+
3+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
4+
permissions:
5+
contents: read
6+
pages: write
7+
id-token: write
8+
9+
on:
10+
push:
11+
branches: [ master ]
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Set up JDK 1.8
20+
uses: actions/setup-java@v1
21+
with:
22+
java-version: 1.8
23+
- name: Build with Gradle
24+
uses: eskatos/gradle-command-action@v1.3.1
25+
with:
26+
arguments: clean build installDist
27+
wrapper-cache-enabled: true
28+
dependencies-cache-enabled: true
29+
configuration-cache-enabled: true
30+
- name: Log in to Azure CLI
31+
uses: azure/login@v2
32+
with:
33+
client-id: ${{ secrets.AZURE_CLIENT_ID }}
34+
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
35+
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
36+
- name: Deploy
37+
uses: mojira/deploy@main
38+
with:
39+
bastion_name: ${{ secrets.BASTION_NAME }}
40+
resource_group: ${{ secrets.RESOURCE_GROUP }}
41+
resource_id: ${{ secrets.RESOURCE_ID }}
42+
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
43+
username: risa
44+
artifact_paths: |-
45+
build/install/risa/lib
46+
build/install/risa/bin
47+
risa.yml
48+
artifact_destination: /home/risa/r-isa
49+
script: |
50+
/usr/bin/screen -ls | /bin/egrep 'Detached|Attached' | /usr/bin/cut -d. -f1 | /usr/bin/awk '{print $1}' | /usr/bin/xargs /bin/kill
51+
sleep 1
52+
cd r-isa
53+
/usr/bin/screen -d -m bash -c '/home/risa/r-isa/bin/risa; exec sh'
54+

‎.github/workflows/push.yml

-76
This file was deleted.

0 commit comments

Comments
 (0)