-
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.
Merge branch 'main' of https://github.com/raga70/OpenVidStreamer
- Loading branch information
Showing
3 changed files
with
59 additions
and
1 deletion.
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
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 Frontend | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
paths: | ||
- 'Frontend/openvidstreamer-fe/**' | ||
pull_request: | ||
branches: [ "main" ] | ||
paths: | ||
- 'Frontend/openvidstreamer-fe/**' | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '18' # Adjust this to match your project's Node.js version | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
working-directory: ./Frontend/openvidstreamer-fe | ||
|
||
- name: Install Vite globally | ||
run: npm install -g vite | ||
|
||
- name: Build project using Vite | ||
run: vite build | ||
working-directory: ./Frontend/openvidstreamer-fe | ||
|
||
- name: Clean up target directory on server | ||
uses: appleboy/ssh-action@master | ||
with: | ||
host: 145.220.74.148 | ||
username: ubuntu | ||
password: ${{ secrets.DEPLSSH_PASSWORD }} | ||
port: 22 | ||
script: | | ||
find /var/www/fe -mindepth 1 -delete | ||
- name: Copy build to server | ||
uses: appleboy/scp-action@master | ||
with: | ||
host: 145.220.74.148 | ||
username: ubuntu | ||
password: ${{ secrets.DEPLSSH_PASSWORD }} | ||
port: 22 | ||
source: "./Frontend/openvidstreamer-fe/dist/*" | ||
target: "/var/www/fe" |
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 |
---|---|---|
|
@@ -10,4 +10,4 @@ | |
<div id="root"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
</html> | ||
</html> |