-
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.
Use custom GitHub action for deployment
- Loading branch information
1 parent
29f9657
commit eed0eb9
Showing
2 changed files
with
54 additions
and
76 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Build and deploy | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
- name: Build with Gradle | ||
uses: eskatos/gradle-command-action@v1.3.1 | ||
with: | ||
arguments: clean build installDist | ||
wrapper-cache-enabled: true | ||
dependencies-cache-enabled: true | ||
configuration-cache-enabled: true | ||
- name: Log in to Azure CLI | ||
uses: azure/login@v2 | ||
with: | ||
client-id: ${{ secrets.AZURE_CLIENT_ID }} | ||
tenant-id: ${{ secrets.AZURE_TENANT_ID }} | ||
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | ||
- name: Deploy | ||
uses: mojira/deploy@main | ||
with: | ||
bastion_name: ${{ secrets.BASTION_NAME }} | ||
resource_group: ${{ secrets.RESOURCE_GROUP }} | ||
resource_id: ${{ secrets.RESOURCE_ID }} | ||
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
username: risa | ||
artifact_paths: |- | ||
build/install/risa/lib | ||
build/install/risa/bin | ||
risa.yml | ||
artifact_destination: /home/risa/r-isa | ||
script: | | ||
/usr/bin/screen -ls | /bin/egrep 'Detached|Attached' | /usr/bin/cut -d. -f1 | /usr/bin/awk '{print $1}' | /usr/bin/xargs /bin/kill | ||
sleep 1 | ||
cd r-isa | ||
/usr/bin/screen -d -m bash -c '/home/risa/r-isa/bin/risa; exec sh' | ||
This file was deleted.
Oops, something went wrong.