add deployment script
All checks were successful
ci/woodpecker/push/pipeline Pipeline was successful
All checks were successful
ci/woodpecker/push/pipeline Pipeline was successful
This commit is contained in:
parent
d28cbffd55
commit
41a02e4a7d
10 changed files with 51 additions and 7 deletions
21
.woodpecker/deploy.sh
Executable file
21
.woodpecker/deploy.sh
Executable file
|
@ -0,0 +1,21 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
host=root@oxaliq.net
|
||||||
|
targetdir=/var/www/art.oxaliq.net/html-tower
|
||||||
|
|
||||||
|
echo "COPYING FILES TO DEPLOYMENT TARGET"
|
||||||
|
scp -r src "$host":~/html-tower
|
||||||
|
|
||||||
|
echo "SETTING OWNERSHIP AND PERMISSIONS"
|
||||||
|
ssh $host 'chown -R www-data:www-data html-tower/'
|
||||||
|
ssh $host 'chown -R 755 html-tower'
|
||||||
|
|
||||||
|
echo "REPLACING PREVIOUS DEPLOYMENT"
|
||||||
|
ssh $host "rm -rf $targetdir || true"
|
||||||
|
ssh $host "mv html-tower $targetdir"
|
||||||
|
|
||||||
|
echo "RESTARTING SERVICE"
|
||||||
|
ssh $host 'systemctl restart nginx.service'
|
||||||
|
|
||||||
|
echo "SUCCESS!"
|
||||||
|
exit 0
|
23
.woodpecker/pipeline.yaml
Normal file
23
.woodpecker/pipeline.yaml
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
include: [ main ]
|
||||||
|
|
||||||
|
# no testing at the moment, just huck it onto the server
|
||||||
|
steps:
|
||||||
|
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
|
|
@ -1,13 +1,13 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<script src="transform.js" defer></script>
|
<script src="scripts/transform.js" defer></script>
|
||||||
<script src="collision.js" defer></script>
|
<script src="scripts/collision.js" defer></script>
|
||||||
<script src="input.js" defer></script>
|
<script src="scripts/input.js" defer></script>
|
||||||
<script src="player.js" defer></script>
|
<script src="scripts/player.js" defer></script>
|
||||||
<script src="environment.js" defer></script>
|
<script src="scripts/environment.js" defer></script>
|
||||||
<script src="debug.js" defer></script>
|
<script src="scripts/debug.js" defer></script>
|
||||||
<script src="engine.js" defer></script>
|
<script src="scripts/engine.js" defer></script>
|
||||||
<style>
|
<style>
|
||||||
.debug[data-state="running"] {
|
.debug[data-state="running"] {
|
||||||
background-color: rgb(30,200,30);
|
background-color: rgb(30,200,30);
|
Loading…
Reference in a new issue