Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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 ./...
55 changes: 55 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -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




5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,7 @@ go.work.sum

# Editor/IDE
# .idea/
# .vscode/
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Э

# .vscode/
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Норм


# Doc2Go
_site/
3 changes: 2 additions & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package main

import (
"ManyLines/internal/handlers"
"log"

"github.com/ManyLinesEditor/backend/internal/handlers"

"github.com/gin-gonic/gin"
)

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module ManyLines
module github.com/ManyLinesEditor/backend

go 1.26.1

Expand Down
2 changes: 1 addition & 1 deletion internal/handlers/default_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net/http/httptest"
"testing"

"ManyLines/internal/handlers"
"github.com/ManyLinesEditor/backend/internal/handlers"

"github.com/gin-gonic/gin"
)
Expand Down
Loading