test deploy
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,3 +4,4 @@ target/
|
|||||||
site/
|
site/
|
||||||
style/output.css
|
style/output.css
|
||||||
.env
|
.env
|
||||||
|
.env-prod
|
||||||
|
|||||||
23
Makefile
23
Makefile
@@ -1,18 +1,19 @@
|
|||||||
deploy:
|
deploy:
|
||||||
npx tailwindcss -i ./input.css -o ./style/output.css --minify
|
#npx tailwindcss -i ./input.css -o ./style/output.css --minify
|
||||||
tac Cargo.toml | sed '1s/^.//' | tac > fichier_temp.txt && mv fichier_temp.txt Cargo.toml
|
#tac Cargo.toml | sed '1s/^.//' | tac > fichier_temp.txt && mv fichier_temp.txt Cargo.toml
|
||||||
#cargo leptos build
|
#cargo leptos build
|
||||||
cargo leptos build --release
|
#cargo leptos build --release
|
||||||
tac Cargo.toml | sed '1s/^/#/' | tac > fichier_temp.txt && mv fichier_temp.txt Cargo.toml
|
#tac Cargo.toml | sed '1s/^/#/' | tac > fichier_temp.txt && mv fichier_temp.txt Cargo.toml
|
||||||
ssh raspiwork "sudo systemctl stop rust_leptos.service"
|
#ssh raspiwork "sudo systemctl stop rust_leptos.service"
|
||||||
scp target/aarch64-unknown-linux-gnu/release/rust_leptos raspiwork:/var/www/rust_leptos/rust_leptos
|
#scp target/aarch64-unknown-linux-gnu/release/rust_leptos raspiwork:/var/www/rust_leptos/rust_leptos
|
||||||
#scp target/aarch64-unknown-linux-gnu/debug/rust_leptos raspiwork:/var/www/rust_leptos/rust_leptos
|
#scp target/aarch64-unknown-linux-gnu/debug/rust_leptos raspiwork:/var/www/rust_leptos/rust_leptos
|
||||||
scp -r target/site raspiwork:/var/www/rust_leptos/
|
#scp -r target/site raspiwork:/var/www/rust_leptos/
|
||||||
ssh raspiwork "sudo systemctl start rust_leptos.service"
|
#ssh raspiwork "sudo systemctl start rust_leptos.service"
|
||||||
|
ssh raspitipi 'cd /home/pi/scripts/rust_leptos && git pull origin main && make install'
|
||||||
|
|
||||||
install:
|
install:
|
||||||
cargo leptos build --release
|
npx tailwindcss -i ./input.css -o ./style/output.css --minify
|
||||||
|
wasm-pack build --target=web --no-default-features --features=hydrate
|
||||||
sudo systemctl stop rust_leptos.service
|
sudo systemctl stop rust_leptos.service
|
||||||
cp target/release/rust_leptos /var/www/rust_leptos/rust_leptos
|
cargo leptos build --release
|
||||||
cp -r target/site /var/www/rust_leptos/
|
|
||||||
sudo systemctl start rust_leptos.service
|
sudo systemctl start rust_leptos.service
|
||||||
|
|||||||
@@ -13,12 +13,12 @@ npx tailwindcss -i ./input.css -o ./style/output.css --watch
|
|||||||
example of systemd config
|
example of systemd config
|
||||||
```
|
```
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Running rust script
|
Description=Home website
|
||||||
After=multi-user.target
|
After=mysql.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
EnvironmentFile=/home/pi/Scripts/rust_mosquitto/target/release/.env
|
EnvironmentFile=/var/www/rust_leptos/.env
|
||||||
ExecStart=/home/pi/Scripts/rust_mosquitto/target/release/rust_mosquitto
|
ExecStart=/var/www/rust_leptos/rust_leptos
|
||||||
Type=simple
|
Type=simple
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|||||||
@@ -61,6 +61,14 @@ pub fn Links() -> impl IntoView {
|
|||||||
prop:value=move || reset_form.get()
|
prop:value=move || reset_form.get()
|
||||||
class="text-center bg-prim border border-transparent rounded-lg focus:border-third px-2 py-2 w-60" />
|
class="text-center bg-prim border border-transparent rounded-lg focus:border-third px-2 py-2 w-60" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label class="block mt-3 mb-1">"Icône"</label>
|
||||||
|
<input type="url"
|
||||||
|
name="icon"
|
||||||
|
placeholder="http..."
|
||||||
|
class="text-center bg-prim border border-transparent rounded-lg focus:border-third px-2 py-2 w-60" />
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button type="submit" class="bg-third hover:bg-third-light rounded-lg transition-colors px-2 py-1 w-60 my-5">"Valider"</button>
|
<button type="submit" class="bg-third hover:bg-third-light rounded-lg transition-colors px-2 py-1 w-60 my-5">"Valider"</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user