-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #164 from IQSS/fix/161-flat-secrets-beta-testing-d…
…eploy Update the beta-testing deploy GitHub action to use "flat" GitHub secrets
- Loading branch information
Showing
2 changed files
with
10 additions
and
12 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 |
---|---|---|
|
@@ -8,7 +8,6 @@ on: | |
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
environment: beta-testing | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
@@ -33,7 +32,7 @@ jobs: | |
|
||
- name: Create and populate .env file | ||
env: | ||
DATAVERSE_BACKEND_URL: ${{ secrets.DATAVERSE_BACKEND_URL }} | ||
DATAVERSE_BACKEND_URL: ${{ secrets.BETA_DATAVERSE_BACKEND_URL }} | ||
run: | | ||
touch .env | ||
echo VITE_DATAVERSE_BACKEND_URL="$DATAVERSE_BACKEND_URL" >> .env | ||
|
@@ -50,7 +49,6 @@ jobs: | |
deploy-to-payara: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
environment: beta-testing | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
@@ -76,23 +74,23 @@ jobs: | |
- name: Copy war file to remote instance | ||
uses: appleboy/scp-action@master | ||
with: | ||
host: ${{ secrets.PAYARA_INSTANCE_HOST }} | ||
username: ${{ secrets.PAYARA_INSTANCE_USERNAME }} | ||
key: ${{ secrets.PAYARA_INSTANCE_SSH_PRIVATE_KEY }} | ||
host: ${{ secrets.BETA_PAYARA_INSTANCE_HOST }} | ||
username: ${{ secrets.BETA_PAYARA_INSTANCE_USERNAME }} | ||
key: ${{ secrets.BETA_PAYARA_INSTANCE_SSH_PRIVATE_KEY }} | ||
source: './deployment/payara/target/dataverse-frontend.war' | ||
target: '/home/${{ secrets.PAYARA_INSTANCE_USERNAME }}' | ||
target: '/home/${{ secrets.BETA_PAYARA_INSTANCE_USERNAME }}' | ||
overwrite: true | ||
|
||
- name: Execute payara war deployment remotely | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.PAYARA_INSTANCE_HOST }} | ||
username: ${{ secrets.PAYARA_INSTANCE_USERNAME }} | ||
key: ${{ secrets.PAYARA_INSTANCE_SSH_PRIVATE_KEY }} | ||
host: ${{ secrets.BETA_PAYARA_INSTANCE_HOST }} | ||
username: ${{ secrets.BETA_PAYARA_INSTANCE_USERNAME }} | ||
key: ${{ secrets.BETA_PAYARA_INSTANCE_SSH_PRIVATE_KEY }} | ||
script: | | ||
APPLICATION_NAME=dataverse-frontend | ||
APPLICATION_WAR_PATH=deployment/payara/target/$APPLICATION_NAME.war | ||
ASADMIN='/usr/local/payara5/bin/asadmin --user admin' | ||
ASADMIN='/usr/local/payara6/bin/asadmin --user admin' | ||
DATAVERSE_FRONTEND=`$ASADMIN list-applications |grep $APPLICATION_NAME |awk '{print $1}'` | ||
$ASADMIN undeploy $DATAVERSE_FRONTEND | ||
$ASADMIN deploy --name $APPLICATION_NAME --contextroot /spa $APPLICATION_WAR_PATH |
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