-
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.
Removed non-existent build dependency for github workflow. and build …
…Project Client and Set up Rust toolchain + Build Project Server as two separate jobs that run simultaneously.
- Loading branch information
1 parent
79ea30f
commit 56a0c5b
Showing
34 changed files
with
329 additions
and
266 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 |
---|---|---|
|
@@ -7,9 +7,8 @@ on: | |
- deploy | ||
|
||
jobs: | ||
test-build: | ||
build-client: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
|
@@ -19,9 +18,29 @@ jobs: | |
with: | ||
node-version: '21' # Set the Node.js version | ||
|
||
- name: Build Project | ||
- name: Build Project Client | ||
run: | | ||
cd ./client | ||
echo '*' >> .eslintignore | ||
npm install [email protected] --save-dev # Force TypeScript to a compatible version | ||
npm install | ||
npm run build | ||
build-server: | ||
runs-on: ubuntu-latest | ||
needs: build-client | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly-2023-03-01 | ||
override: true | ||
|
||
- name: Build Project Server | ||
run: | | ||
cd ./server | ||
cargo build --verbose |
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 |
---|---|---|
|
@@ -7,7 +7,7 @@ on: | |
- deploy | ||
|
||
jobs: | ||
build-and-deploy: | ||
build-and-deploy-client: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
@@ -22,6 +22,7 @@ jobs: | |
- name: Build Project | ||
run: | | ||
cd ./client | ||
echo '*' >> .eslintignore | ||
npm install [email protected] --save-dev # Force TypeScript to a compatible version | ||
npm install | ||
npm run build | ||
|
@@ -47,3 +48,40 @@ jobs: | |
port: 22 | ||
script: "nginx -s reload" | ||
|
||
build-and-deploy-server: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: nightly-2023-03-01 | ||
override: true | ||
|
||
- name: Build Project Server | ||
run: | | ||
cd ./server | ||
cargo build --release --verbose | ||
- name: Copy files to the server | ||
uses: appleboy/scp-action@master | ||
with: | ||
host: ${{ secrets.REMOTE_HOST }} | ||
username: ${{ secrets.REMOTE_USER }} | ||
key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
port: 22 | ||
source: "server/target/release/server" | ||
target: "/usr/local/bin/" | ||
strip_components: 3 | ||
|
||
- name: Reload Systemd | ||
uses: appleboy/ssh-action@master | ||
with: | ||
host: ${{ secrets.REMOTE_HOST }} | ||
username: ${{ secrets.REMOTE_USER }} | ||
key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
port: 22 | ||
script: "sudo systemctl daemon-reload && sudo systemctl restart personal_portfolio_client.service" |
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 +0,0 @@ | ||
* | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
Oops, something went wrong.