From 168540d4b694cca5a0d7aa48cde03e119499a12c Mon Sep 17 00:00:00 2001 From: myDan Date: Tue, 31 Mar 2026 17:43:07 +0300 Subject: [PATCH 1/3] refactor-(module) rename module Renamed Go module to match pkg.go.dev ->27 --- cmd/main.go | 3 ++- go.mod | 2 +- internal/handlers/default_test.go | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cmd/main.go b/cmd/main.go index 679b55e..bebd887 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -1,9 +1,10 @@ package main import ( - "ManyLines/internal/handlers" "log" + "github.com/ManyLinesEditor/backend/internal/handlers" + "github.com/gin-gonic/gin" ) diff --git a/go.mod b/go.mod index a02f294..a368810 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module ManyLines +module github.com/ManyLinesEditor/backend go 1.26.1 diff --git a/internal/handlers/default_test.go b/internal/handlers/default_test.go index fde256c..9d4d30e 100644 --- a/internal/handlers/default_test.go +++ b/internal/handlers/default_test.go @@ -5,7 +5,7 @@ import ( "net/http/httptest" "testing" - "ManyLines/internal/handlers" + "github.com/ManyLinesEditor/backend/internal/handlers" "github.com/gin-gonic/gin" ) From 3672153cbfa28f94341626506ec156a51d54c0a3 Mon Sep 17 00:00:00 2001 From: myDan Date: Tue, 31 Mar 2026 17:48:59 +0300 Subject: [PATCH 2/3] conf-(ci) add GitHub Actions pipeline for tests running ->27 --- .github/workflows/ci.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..0427181 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,25 @@ +name: CI + +on: + pull_request: + branches: + - main + +permissions: + contents: read + +jobs: + test: + name: Run tests + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.26' + + - name: Run tests + run: go test ./... \ No newline at end of file From 42beba55fdd8f9cc031abe6b78c42726f52f0255 Mon Sep 17 00:00:00 2001 From: myDan Date: Tue, 31 Mar 2026 23:03:06 +0300 Subject: [PATCH 3/3] conf-(ci) add Doc2Go workflow for docs generation and Pages deploy ->27 --- .github/workflows/pages.yml | 55 +++++++++++++++++++++++++++++++++++++ .gitignore | 5 +++- 2 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/pages.yml diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 0000000..a7ee993 --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,55 @@ +name: Deploy Doc2Go to GitHub pages + +on: + push: + branches: + - main + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + build: + name: Build website + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.26' + + - name: Install doc2go + run: go install go.abhg.dev/doc2go@latest + + - name: Generate API reference + run: doc2go ./... + + - name: Upload pages + uses: actions/upload-pages-artifact@v3 + with: + path: _site/ + deploy: + name: Deploy to GitHub Pages + needs: build + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 + + + + \ No newline at end of file diff --git a/.gitignore b/.gitignore index c8ad409..9f63c6a 100644 --- a/.gitignore +++ b/.gitignore @@ -23,4 +23,7 @@ go.work.sum # Editor/IDE # .idea/ -# .vscode/ \ No newline at end of file +# .vscode/ + +# Doc2Go +_site/ \ No newline at end of file