This repository has been archived by the owner on Dec 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
291a7f0
commit e44d293
Showing
1 changed file
with
22 additions
and
3 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Build static files and deploy | ||
name: Build and deploy | ||
|
||
on: | ||
# Allow manual trigger of the workflow | ||
|
@@ -9,7 +9,7 @@ on: | |
jobs: | ||
build-frontend: | ||
if: github.repository_owner == 'one-zero-eight' | ||
name: Build static files | ||
name: Build frontend | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
|
@@ -51,7 +51,7 @@ jobs: | |
|
||
deploy-frontend: | ||
if: github.repository_owner == 'one-zero-eight' | ||
name: Deploy to server | ||
name: Deploy frontend | ||
needs: build-frontend | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
@@ -71,3 +71,22 @@ jobs: | |
strip_components: 1 | ||
overwrite: true | ||
rm: true | ||
|
||
deploy-backend: | ||
if: github.repository_owner == 'one-zero-eight' | ||
name: Deploy backend | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Deploy via SSH | ||
uses: appleboy/[email protected] | ||
with: | ||
host: ${{ secrets.SSH_HOST }} | ||
username: ${{ secrets.SSH_USERNAME }} | ||
password: ${{ secrets.SSH_PASSWORD }} | ||
script_stop: true # Stop script on error | ||
command_timeout: 30m | ||
script: | | ||
cd "${{ secrets.SSH_REPOSITORY }}" | ||
git pull origin main | ||
cd backend | ||
docker compose up -d --build --pull always |