Add deploy and staging scripts
This commit is contained in:
parent
b53ad99d72
commit
a8fdecd74c
|
@ -294,10 +294,11 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "blogdb"
|
name = "blogdb"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://git.augustkline.com/august/blogdb#67c0c156cc42f32a35c1815c39762b841cab4ea7"
|
source = "git+https://git.augustkline.com/august/blogdb#136b42918f09a527653e4535fbee096a29e13309"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"argon2",
|
"argon2",
|
||||||
|
"dotenvy",
|
||||||
"infer",
|
"infer",
|
||||||
"mime_guess",
|
"mime_guess",
|
||||||
"rand 0.8.5",
|
"rand 0.8.5",
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
#! /usr/bin/env bash
|
||||||
|
|
||||||
|
# this only works on macos for now, cross compilation toolchain from https://github.com/messense/homebrew-macos-cross-toolchains
|
||||||
|
|
||||||
|
cargo update;
|
||||||
|
|
||||||
|
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=x86_64-linux-gnu-gcc cargo build --release --target x86_64-unknown-linux-gnu;
|
||||||
|
|
||||||
|
scp target/x86_64-unknown-linux-gnu/release/evie kline@augustkline.com:/home/kline/;
|
||||||
|
|
||||||
|
ssh kline@augustkline.com "mv ~/evie /var/www/evieippolito.com/; sudo systemctl restart evie"
|
|
@ -115,7 +115,7 @@ impl BlogStateInner {
|
||||||
let username = env!("INIT_USER_NAME").to_string();
|
let username = env!("INIT_USER_NAME").to_string();
|
||||||
let password = env!("INIT_USER_PASSWORD").to_string();
|
let password = env!("INIT_USER_PASSWORD").to_string();
|
||||||
let domain = env!("DOMAIN").to_string();
|
let domain = env!("DOMAIN").to_string();
|
||||||
let db = BlogDb::new(&username, password.clone(), DB_URL).await?;
|
let db = BlogDb::new(&username, password.clone()).await?;
|
||||||
Self::add_initial_assets(&db).await?;
|
Self::add_initial_assets(&db).await?;
|
||||||
Self::add_initial_pages(&db).await?;
|
Self::add_initial_pages(&db).await?;
|
||||||
#[cfg(debug_assertions)]
|
#[cfg(debug_assertions)]
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
#! /usr/bin/env bash
|
||||||
|
|
||||||
|
# this only works on macos for now, cross compilation toolchain from https://github.com/messense/homebrew-macos-cross-toolchains
|
||||||
|
|
||||||
|
cargo update;
|
||||||
|
|
||||||
|
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=x86_64-linux-gnu-gcc cargo build --release --target x86_64-unknown-linux-gnu;
|
||||||
|
|
||||||
|
scp target/x86_64-unknown-linux-gnu/release/evie kline@augustkline.com:/home/kline/;
|
||||||
|
|
||||||
|
ssh kline@augustkline.com "mv ~/evie /var/www/staging.evieippolito.com/; sudo systemctl restart evie-staging"
|
Loading…
Reference in New Issue