-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: write oracle.yml test depoloy to ocl
- Loading branch information
Showing
1 changed file
with
51 additions
and
0 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,51 @@ | ||
name: Deploy to OCI | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- deploy-test | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: setup node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18.x' | ||
|
||
- name: setup pnpm | ||
run: | | ||
corepck enable | ||
corepack prepare pnpm@latest-8 --activate | ||
pnpm config set store-dir .pnpm-store | ||
- name: Install dependencies | ||
working-directory: backend | ||
run: pnpm install | ||
|
||
- name: Build | ||
working-directory: backend | ||
run: pnpm run build | ||
|
||
- name: Deploy | ||
uses: appleboy/ssh-action@master | ||
with: | ||
host: ${{ secrets.OCL_IP }} | ||
username: ${{ secrets.OCL_USER }} | ||
key: ${{ secrets.OCL_KEY }} | ||
port: ${{ secrets.OCL_PORT }} | ||
script: | | ||
cd /home/opc/backend | ||
git pull | ||
cd backend | ||
sudo docker compose down | ||
sudo docker compose up -d --build | ||