repos / pico

pico services - prose.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh
git clone https://github.com/picosh/pico.git

commit
4294df9
parent
e94176f
author
Eric Bower
date
2023-11-11 05:15:03 +0000 UTC
fix(gha): copy contents not dir itself
4 files changed,  +8, -5
M .github/workflows/pgs.yml
+1, -1
1@@ -24,7 +24,7 @@ jobs:
2         with:
3           user: hey
4           key: ${{ secrets.PRIVATE_KEY }}
5-          src: './public'
6+          src: './public/'
7           project: "pgs-${{ steps.vars.outputs.sha_short }}"
8           promote: "pgs-prod"
9           retain: "pgs-"
M .github/workflows/static.yml
+1, -1
1@@ -34,7 +34,7 @@ jobs:
2         with:
3           user: hey
4           key: ${{ secrets.PRIVATE_KEY }}
5-          src: './public'
6+          src: './public/'
7           project: "git-pico-${{ steps.vars.outputs.sha_short }}"
8           promote: "git-pico"
9           retain: "git-pico-"
M Makefile
+2, -1
 1@@ -83,7 +83,8 @@ pgs-site:
 2 .PHONY: pgs-site
 3 
 4 pgs-deploy: pgs-static pgs-site
 5-	scp -R ./public/* hey@pgs.sh:/pgs-local
 6+	# rsync -rv -e "ssh -p 2222" ./public/ erock@localhost:/pgs-local
 7+	rsync -rv ./public/ hey@pgs.sh:/pgs-local
 8 	ssh hey@pgs.sh link pgs-prod pgs-local --write
 9 .PHONY: pgs-site-deploy
10 
M pgs/api.go
+4, -2
 1@@ -231,7 +231,9 @@ func assetHandler(w http.ResponseWriter, h *AssetHandler) {
 2 	var contents utils.ReaderAtCloser
 3 	assetFilepath := ""
 4 	status := 200
 5+	attempts := []string{}
 6 	for _, fp := range routes {
 7+		attempts = append(attempts, fp.Filepath)
 8 		c, _, _, err := h.Storage.GetFile(bucket, fp.Filepath)
 9 		if err == nil {
10 			contents = c
11@@ -243,9 +245,9 @@ func assetHandler(w http.ResponseWriter, h *AssetHandler) {
12 
13 	if assetFilepath == "" {
14 		h.Logger.Infof(
15-			"asset not found in bucket: bucket:[%s], file:[%s]",
16+			"asset not found in bucket: bucket:[%s], routes:[%s]",
17 			bucket.Name,
18-			h.Filepath,
19+			strings.Join(attempts, ", "),
20 		)
21 		http.Error(w, "404 not found", http.StatusNotFound)
22 		return