Skip to content

Commit

Permalink
Merge pull request #16 from EntryDSM/feature/15-xquare-deployment-setup
Browse files Browse the repository at this point in the history
Feature/15 xquare deployment setup
  • Loading branch information
kangeunchan authored Jan 7, 2025
2 parents 03579b8 + ae37bdb commit 931627a
Show file tree
Hide file tree
Showing 3 changed files with 125 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/prod-git-action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: stag-casper-recruitment

on:
push:
branches: [ main ]

jobs:
build:
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Java
uses: actions/setup-java@v2
with:
java-version: '17'

- name: Build Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: |
build
--build-cache
--no-daemon
- name: Deploy to xquare
uses: team-xquare/xquare-deployment-action@master
with:
environment: prod
access_key: ${{ secrets.ACCESS_KEY }}
buildargs: |
GITHUB_CLIENT_ID: ${{ secrets.GITHUB_CLIENT_ID }}
ACCESS_EXP: ${{ secrets.ACCESS_EXP }}
DB_NAME: ${{ secrets.DB_NAME }}
HEADER: ${{ secrets.HEADER }}
REFRESH_EXP: ${{ secrets.REFRESH_EXP }}
GITHUB_AUTHORIZATION_GRANT_TYPE: ${{ secrets.GITHUB_AUTHORIZATION_GRANT_TYPE }}
USER_INFO_URI: ${{ secrets.USER_INFO_URI }}
GITHUB_ACCESS_SCOPE_1: ${{ secrets.GITHUB_ACCESS_SCOPE_1 }}
DB_USERNAME: ${{ secrets.DB_USERNAME }}
JPA_SHOW_SQL: ${{ secrets.JPA_SHOW_SQL }}
REDIS_PORT: ${{ secrets.REDIS_PORT }}
JWT_SECRET: ${{ secrets.JWT_SECRET }}
AUTHORIZATION_URI: ${{ secrets.AUTHORIZATION_URI }}
GITHUB_ACCESS_SCOPE_2: ${{ secrets.GITHUB_ACCESS_SCOPE_2 }}
GITHUB_REDIRECT_URI: ${{ secrets.GITHUB_REDIRECT_URI }}
REDIS_HOST: ${{ secrets.REDIS_HOST }}
USER_NAME_ATTRIBUTE: ${{ secrets.USER_NAME_ATTRIBUTE }}
GITHUB_CLIENT_SECRET: ${{ secrets.GITHUB_CLIENT_SECRET }}
GITHUB_CLIENT_NAME: ${{ secrets.GITHUB_CLIENT_NAME }}
DB_HOST: ${{ secrets.DB_HOST }}
PREFIX: ${{ secrets.PREFIX }}
JPA_FORMAT_SQL: ${{ secrets.JPA_FORMAT_SQL }}
JPA_HIBERNATE_DDL_AUTO: ${{ secrets.JPA_HIBERNATE_DDL_AUTO }}
TOKEN_URI: ${{ secrets.TOKEN_URI }}
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
60 changes: 60 additions & 0 deletions .github/workflows/stag-git-action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: prod-casper-recruitment

on:
push:
branches: [ main ]

jobs:
build:
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Java
uses: actions/setup-java@v2
with:
java-version: '17'

- name: Build Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: |
build
--build-cache
--no-daemon
- name: Deploy to xquare
uses: team-xquare/xquare-deployment-action@master
with:
environment: prod
access_key: ${{ secrets.ACCESS_KEY }}
buildargs: |
GITHUB_CLIENT_ID: ${{ secrets.GITHUB_CLIENT_ID }}
ACCESS_EXP: ${{ secrets.ACCESS_EXP }}
DB_NAME: ${{ secrets.DB_NAME }}
HEADER: ${{ secrets.HEADER }}
REFRESH_EXP: ${{ secrets.REFRESH_EXP }}
GITHUB_AUTHORIZATION_GRANT_TYPE: ${{ secrets.GITHUB_AUTHORIZATION_GRANT_TYPE }}
USER_INFO_URI: ${{ secrets.USER_INFO_URI }}
GITHUB_ACCESS_SCOPE_1: ${{ secrets.GITHUB_ACCESS_SCOPE_1 }}
DB_USERNAME: ${{ secrets.DB_USERNAME }}
JPA_SHOW_SQL: ${{ secrets.JPA_SHOW_SQL }}
REDIS_PORT: ${{ secrets.REDIS_PORT }}
JWT_SECRET: ${{ secrets.JWT_SECRET }}
AUTHORIZATION_URI: ${{ secrets.AUTHORIZATION_URI }}
GITHUB_ACCESS_SCOPE_2: ${{ secrets.GITHUB_ACCESS_SCOPE_2 }}
GITHUB_REDIRECT_URI: ${{ secrets.GITHUB_REDIRECT_URI }}
REDIS_HOST: ${{ secrets.REDIS_HOST }}
USER_NAME_ATTRIBUTE: ${{ secrets.USER_NAME_ATTRIBUTE }}
GITHUB_CLIENT_SECRET: ${{ secrets.GITHUB_CLIENT_SECRET }}
GITHUB_CLIENT_NAME: ${{ secrets.GITHUB_CLIENT_NAME }}
DB_HOST: ${{ secrets.DB_HOST }}
PREFIX: ${{ secrets.PREFIX }}
JPA_FORMAT_SQL: ${{ secrets.JPA_FORMAT_SQL }}
JPA_HIBERNATE_DDL_AUTO: ${{ secrets.JPA_HIBERNATE_DDL_AUTO }}
TOKEN_URI: ${{ secrets.TOKEN_URI }}
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
5 changes: 5 additions & 0 deletions .xquare/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
config:
name: casper-recruitment
prefix: "/entry-casper-recruitment"
service_type: be
port: 8080

0 comments on commit 931627a

Please sign in to comment.