serve web
Some checks failed
ci/woodpecker/push/pipeline Pipeline failed

This commit is contained in:
sorrel 2024-04-30 17:54:06 -04:00
parent b2ae852f0b
commit cec08b5709
3 changed files with 24 additions and 21 deletions

0
.woodpecker/deploy.sh Normal file → Executable file
View file

View file

@ -1,5 +1,3 @@
name: ludo-go-pipeline
when:
branch:
include: [ main ]
@ -11,20 +9,20 @@ steps:
- cargo build --workspace -r
- cargo test --verbose
deploy:
image: alpine:latest
secrets:
- oxaliq_deploy_ssh
commands:
- echo "SETTING UP SSH"
- apk add openssh-client
- mkdir -p $HOME/.ssh
- ssh-keyscan -t ed25519 oxaliq.net >> $HOME/.ssh/known_hosts
- echo "$oxaliq_deploy_ssh" > $HOME/.ssh/id_ed25519
- chmod 0600 $HOME/.ssh/id_ed25519
- echo "SSH SETUP DONE"
- echo "RUNNING DEPLOY SCRIPT"
- ./.woodpecker/deploy.sh
when:
# Only try to deploy if previous step is successful
status: success
deploy:
image: alpine:latest
secrets:
- oxaliq_deploy_ssh
commands:
- echo "SETTING UP SSH"
- apk add openssh-client
- mkdir -p $HOME/.ssh
- ssh-keyscan -t ed25519 oxaliq.net >> $HOME/.ssh/known_hosts
- echo "$oxaliq_deploy_ssh" > $HOME/.ssh/id_ed25519
- chmod 0600 $HOME/.ssh/id_ed25519
- echo "SSH SETUP DONE"
- echo "RUNNING DEPLOY SCRIPT"
- ./.woodpecker/deploy.sh
when:
# Only try to deploy if previous step is successful
status: success

View file

@ -1,3 +1,8 @@
fn main() {
println!("Hello, world!");
use warp::Filter;
#[tokio::main]
async fn main() {
let root = warp::path::end().map(|| "hello world");
warp::serve(root).run(([127, 0, 0, 1], 5000)).await;
}