Compare commits
	
		
			No commits in common. "ed8eaa0ae8ea88a46c0103917deb81a40a6ae2fb" and "9b184204dc86f5bc30d86a848d1ac1bfcedb8e84" have entirely different histories.
		
	
	
		
			ed8eaa0ae8
			...
			9b184204dc
		
	
		
							
								
								
									
										71
									
								
								.drone.yml
									
									
									
									
									
								
							
							
						
						
									
										71
									
								
								.drone.yml
									
									
									
									
									
								
							| @ -1,71 +0,0 @@ | ||||
| kind: pipeline | ||||
| type: docker | ||||
| name: deploy | ||||
| 
 | ||||
| steps: | ||||
| - name: submodules | ||||
|   image: archlinux | ||||
|   commands:  | ||||
|   - pacman -Sy --noconfirm git >/dev/null | ||||
|   - git submodule update --init --recursive | ||||
| 
 | ||||
| - name: build | ||||
|   image: archlinux | ||||
|   environment: | ||||
|     PYTHON_ENV: python python-pipenv python-setuptools | ||||
| 
 | ||||
|   commands: | ||||
|     # set up python | ||||
|     - pacman -Sy --noconfirm make $PYTHON_ENV > /dev/null | ||||
|     - pipenv install | ||||
| 
 | ||||
|     # build site | ||||
|     - make all | ||||
| 
 | ||||
| - name: deploy | ||||
|   image: ubuntu | ||||
|   environment: | ||||
|     HOST: | ||||
|       from_secret: host | ||||
|     USER: | ||||
|       from_secret: user | ||||
|     SSH_KEY: | ||||
|       from_secret: ssh_key | ||||
| 
 | ||||
|   when: | ||||
|     branch: | ||||
|     - main | ||||
| 
 | ||||
|   commands: | ||||
|     # install deps | ||||
|     - apt-get update -qq > /dev/null | ||||
|     - apt-get install ssh rsync -qq > /dev/null | ||||
| 
 | ||||
|     # configure ssh | ||||
|     - eval $(ssh-agent -s) | ||||
|     - mkdir -p ~/.ssh | ||||
|     - echo "$SSH_KEY" > ~/.ssh/id_rsa | ||||
|     - chmod 600 ~/.ssh/id_rsa | ||||
|     - ssh-add | ||||
|     - echo "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config | ||||
| 
 | ||||
|     # prepare vars for host operations | ||||
|     - host_dir="/var/www/$${HOST}" | ||||
|     - backup_dir="~/backups/$${HOST}/$${HOST}-$${DRONE_STAGE_STARTED}" | ||||
|     - host="$${USER}@$${HOST}" | ||||
| 
 | ||||
|     # tasks | ||||
|     - make_backup_dir="mkdir -p $backup_dir" | ||||
|     - copy_backup_files="rsync -rP $host_dir $backup_dir" | ||||
|     - delete_current_files="sudo -n rm -r $host_dir" | ||||
|     - deploy_new_files="sudo -n mv $${HOST} $host_dir" | ||||
| 
 | ||||
|     # archive old site | ||||
|     - ssh $host $make_backup_dir | ||||
|     - ssh $host $copy_backup_files | ||||
| 
 | ||||
|     # deploy new site | ||||
|     - rsync -rP site/* "$host:$${HOST}" | ||||
|     - ssh $host $delete_current_files | ||||
|     - ssh $host $deploy_new_files | ||||
| 
 | ||||
							
								
								
									
										2
									
								
								.gitmodules
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.gitmodules
									
									
									
									
										vendored
									
									
								
							| @ -3,4 +3,4 @@ | ||||
| 	url = https://github.com/ktyldev/ppp | ||||
| [submodule "blog"] | ||||
| 	path = blog | ||||
| 	url = https://git.pizzawednesday.club/ktyl/blog.git | ||||
| 	url = https://github.com/ktyldev/blog.git | ||||
|  | ||||
							
								
								
									
										12
									
								
								Pipfile
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								Pipfile
									
									
									
									
									
								
							| @ -1,12 +0,0 @@ | ||||
| [[source]] | ||||
| url = "https://pypi.org/simple" | ||||
| verify_ssl = true | ||||
| name = "pypi" | ||||
| 
 | ||||
| [packages] | ||||
| markdown = "*" | ||||
| 
 | ||||
| [dev-packages] | ||||
| 
 | ||||
| [requires] | ||||
| python_version = "3.10" | ||||
							
								
								
									
										29
									
								
								Pipfile.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										29
									
								
								Pipfile.lock
									
									
									
										generated
									
									
									
								
							| @ -1,29 +0,0 @@ | ||||
| { | ||||
|     "_meta": { | ||||
|         "hash": { | ||||
|             "sha256": "4f4f4fc0dc77addc9a4bf6c737f31df9507ee22a83548fcff1891a4e7bc27bed" | ||||
|         }, | ||||
|         "pipfile-spec": 6, | ||||
|         "requires": { | ||||
|             "python_version": "3.10" | ||||
|         }, | ||||
|         "sources": [ | ||||
|             { | ||||
|                 "name": "pypi", | ||||
|                 "url": "https://pypi.org/simple", | ||||
|                 "verify_ssl": true | ||||
|             } | ||||
|         ] | ||||
|     }, | ||||
|     "default": { | ||||
|         "markdown": { | ||||
|             "hashes": [ | ||||
|                 "sha256:08fb8465cffd03d10b9dd34a5c3fea908e20391a2a90b88d66362cb05beed186", | ||||
|                 "sha256:3b809086bb6efad416156e00a0da66fe47618a5d6918dd688f53f40c8e4cfeff" | ||||
|             ], | ||||
|             "index": "pypi", | ||||
|             "version": "==3.4.1" | ||||
|         } | ||||
|     }, | ||||
|     "develop": {} | ||||
| } | ||||
							
								
								
									
										7
									
								
								makefile
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								makefile
									
									
									
									
									
								
							| @ -32,7 +32,6 @@ HTML_TARGETS 	= $(PAGES:$(ROOT_DIR)/%.html=$(OUT_DIR)/%.html) | ||||
| CSS_TARGETS 	= $(STYLES:$(ROOT_DIR)/%.css=$(OUT_DIR)/%.css) | ||||
| PNG_TARGETS		= $(IMG_DIR)/%.png=$(OUT_DIR)/%.png | ||||
| 
 | ||||
| 
 | ||||
| all: $(HTML_TARGETS) $(CSS_TARGETS) blog | $(OUT_DIR) | ||||
| 	cp $(IMG_DIR)/*.png $(OUT_DIR)/ | ||||
| 	cp $(IMG_DIR)/*.jpg $(OUT_DIR)/ | ||||
| @ -55,10 +54,10 @@ $(OUT_DIR): | ||||
| blog: $(BLOG_TARGETS) $(BLOG_RSS) | $(BLOG_TMP_DIR) | ||||
| 
 | ||||
| $(BLOG_RSS): $(BLOG_PAGES) | ||||
| 	pipenv run python scripts/mkblogrss.py $(BLOG_PAGES) > $@ | ||||
| 	python scripts/mkblogrss.py $(BLOG_PAGES) > $@ | ||||
| 
 | ||||
| $(BLOG_INDEX_LINKS): $(BLOG_TARGETS) | $(BLOG_TMP_DIR) | ||||
| 	pipenv run python scripts/mkblogindex.py $(BLOG_TARGETS) > $@ | ||||
| 	python scripts/mkblogindex.py $(BLOG_TARGETS) > $@ | ||||
| 
 | ||||
| $(BLOG_OUT_DIR)/%.html: $(BLOG_OUT_DIR)/%.html.tmp $(HTML_INCLUDES) $(CSS_TARGETS) | ||||
| 	python ppp/ppp.py $< $(HTML_INCLUDES) > $@ | ||||
| @ -66,7 +65,7 @@ $(BLOG_OUT_DIR)/%.html: $(BLOG_OUT_DIR)/%.html.tmp $(HTML_INCLUDES) $(CSS_TARGET | ||||
| 	rm $< | ||||
| 
 | ||||
| $(BLOG_OUT_DIR)/%.html.tmp: $(BLOG_SRC_DIR)/%.md | $(BLOG_TMP_DIR)  | ||||
| 	pipenv run python scripts/mkblog.py $< $@ | ||||
| 	python scripts/mkblog.py $< $@ | ||||
| 
 | ||||
| $(BLOG_OUT_DIR): | $(OUT_DIR) | ||||
| 	mkdir -p $@ | ||||
|  | ||||
							
								
								
									
										10
									
								
								scripts/deploy-ktyl.dev
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										10
									
								
								scripts/deploy-ktyl.dev
									
									
									
									
									
										Executable file
									
								
							| @ -0,0 +1,10 @@ | ||||
| #!/usr/bin/env bash | ||||
| 
 | ||||
| site="ktyl.dev" | ||||
| srcdir="./$site" | ||||
| webroot="/var/www" | ||||
| sitedir="$webroot/$site" | ||||
| 
 | ||||
| 
 | ||||
| [ -d $sitedir ] && rm -r $sitedir | ||||
| sudo -n mv $srcdir $webroot | ||||
| @ -16,6 +16,8 @@ | ||||
| #include socials.html | ||||
| </p> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| </div> | ||||
| 
 | ||||
| #include planets.html | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user