ci: 👷 auto deploy

This commit is contained in:
Ahmet Kaan Gümüş 2025-02-15 02:43:49 +03:00
parent 25dc6e69c6
commit b2b9f517ad
4 changed files with 37 additions and 5 deletions

32
.woodpecker/deploy.yaml Normal file
View file

@ -0,0 +1,32 @@
when:
event:
- push
- manual
branch: main
steps:
build:
image: rust
environment:
SSH_PRIVATE_KEY:
from_secret: SSH_PRIVATE_KEY
SSH_USER:
from_secret: SSH_USER
SSH_HOST:
from_secret: SSH_HOST
CARGO_PATH:
from_secret: CARGO_PATH
WORK_DIR:
from_secret: WORK_DIR
MAIN_BRANCH:
from_secret: MAIN_BRANCH
ARTIFACT_DIR:
from_secret: ARTIFACT_DIR
DEPLOY_PATH:
from_secret: DEPLOY_PATH
commands:
- mkdir -p ~/.ssh
- echo "$${SSH_PRIVATE_KEY}" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa
- ssh-keyscan -H $${SSH_HOST} > ~/.ssh/known_hosts
- ssh $${SSH_USER}@$${SSH_HOST} "export PATH="$${CARGO_PATH}:$PATH" && cd $${WORK_DIR} && git checkout $${MAIN_BRANCH} && git pull --rebase && dx build --release && cp -r $${ARTIFACT_DIR} $${DEPLOY_PATH} && rm -rf $${DEPLOY_PATH}/personality && mv $${DEPLOY_PATH}/public $${DEPLOY_PATH}/personality"
- rm -rf ~/.ssh

View file

@ -8,11 +8,11 @@ edition = "2021"
[dependencies]
dioxus = { version = "0.6.1", features = ["web", "router"] }
dioxus = { version = "0.6.3", features = ["web", "router"] }
# Debug
tracing = "0.1.41"
dioxus-logger = "0.6.1"
dioxus-logger = "0.6.2"
[profile]

View file

@ -103,7 +103,7 @@
}
body {
background-color: rgba(0, 0, 0, 0.85);
background-color: rgba(0, 0, 0, 0.98);
color: silver;
}
@ -195,4 +195,4 @@ footer {
width: 100%;
position: fixed;
background-color: rgb(0, 0, 0, 0.9);
}
}

View file

@ -44,7 +44,7 @@ pub fn Footer() -> Element {
div {class:"footer_div",
footer{
h4 {
"Developed by Tahinli with Rust + WASM without Front End Skills"
"Developed by Tahinli with Rust + WASM"
}
}
}