]> source.dussan.org Git - gitea.git/commitdiff
Refactor Gitpod configuration to improve quick spin up of automated dev environments...
authorYarden Shoham <hrsi88@gmail.com>
Wed, 12 Oct 2022 16:17:04 +0000 (19:17 +0300)
committerGitHub <noreply@github.com>
Wed, 12 Oct 2022 16:17:04 +0000 (12:17 -0400)
This commit instructs Gitpod to run `docs` in watch mode in fresh
development environments so any dev could start hacking in seconds.

Also included some vscode extensions for Vue, Go, and Docker.

Try it here:

[![Open in
Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/yardenshoham/gitea/tree/gitpod)

Signed-off-by: Yarden Shoham <hrsi88@gmail.com>
Co-authored-by: Gusted <williamzijl7@hotmail.com>
.gitpod.yml
README.md
README_ZH.md
docs/content/doc/developers/hacking-on-gitea.en-us.md

index eb3114ce0b262edbd3f5414b11aec1b43a65bb0d..55a12cc9e479135b86105686c077f737f298a17c 100644 (file)
@@ -1,5 +1,3 @@
-image: gitpod/workspace-full:latest
-
 tasks:
   - name: Setup
     init: |
@@ -16,10 +14,13 @@ tasks:
     command: |
       gp sync-await setup
       mkdir -p custom/conf/
-      echo -e "[server]\nROOT_URL=https://3000-$GITPOD_WORKSPACE_ID.${GITPOD_WORKSPACE_CLUSTER_HOST}/" > custom/conf/app.ini
-      echo -e "\n[database]\nDB_TYPE = sqlite3\nPATH = /workspace/gitea/data/gitea.db" >> custom/conf/app.ini
+      echo -e "[server]\nROOT_URL=$(gp url 3000)/" > custom/conf/app.ini
+      echo -e "\n[database]\nDB_TYPE = sqlite3\nPATH = $GITPOD_REPO_ROOT/data/gitea.db" >> custom/conf/app.ini
       export TAGS="sqlite sqlite_unlock_notify"
       make watch-backend
+  - name: Run docs
+    before: sudo bash -c "$(grep 'https://github.com/gohugoio/hugo/releases/download' Makefile | tr -d '\')" # install hugo
+    command: cd docs && make clean update && hugo server -D -F --baseUrl $(gp url 1313) --liveReloadPort=443 --appendPort=false --bind=0.0.0.0
 
 vscode:
   extensions:
@@ -28,7 +29,11 @@ vscode:
     - golang.go
     - stylelint.vscode-stylelint
     - DavidAnson.vscode-markdownlint
+    - johnsoncodehk.volar
+    - ms-azuretools.vscode-docker
 
 ports:
   - name: Gitea
     port: 3000
+  - name: Docs
+    port: 1313
index 80f1159aea1fa908a75efcd8b38938de0e699ea3..115cafb58d4aeb072b84cd15909e41482c92d9cc 100644 (file)
--- a/README.md
+++ b/README.md
   <a href="https://opensource.org/licenses/MIT" title="License: MIT">
     <img src="https://img.shields.io/badge/License-MIT-blue.svg">
   </a>
+  <a href="https://gitpod.io/#https://github.com/go-gitea/gitea">
+  <img
+    src="https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod"
+    alt="Contribute with Gitpod"
+  />
+  </a>
   <a href="https://crowdin.com/project/gitea" title="Crowdin">
     <img src="https://badges.crowdin.net/gitea/localized.svg">
   </a>
index 2be35742672fddfe164ec4288e9cb80640359afb..0e58ad6d4a46eb2d98fab2140b704f605b3fcf63 100644 (file)
   <a href="https://opensource.org/licenses/MIT" title="License: MIT">
     <img src="https://img.shields.io/badge/License-MIT-blue.svg">
   </a>
+  <a href="https://gitpod.io/#https://github.com/go-gitea/gitea">
+  <img
+    src="https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod"
+    alt="Contribute with Gitpod"
+  />
+  </a>
   <a href="https://crowdin.com/project/gitea" title="Crowdin">
     <img src="https://badges.crowdin.net/gitea/localized.svg">
   </a>
index 5f1cdff51d57f4cf2aa08037f5fe05965a91c509..d8427b58f32b0a4f6d5abaa9645b5a06116638b7 100644 (file)
@@ -19,6 +19,12 @@ menu:
 
 {{< toc >}}
 
+## Quickstart
+
+To get a quick working development environment you could use Gitpod.
+
+[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/go-gitea/gitea)
+
 ## Installing go
 
 You should [install go](https://golang.org/doc/install) and set up your go