Use category instead of place holder markdown file as directory (#299)

Reviewed-on: https://gitea.com/gitea/docs/pulls/299
This commit is contained in:
Lunny Xiao
2025-11-20 18:02:34 +00:00
parent 0787ea1fbe
commit dcb9b9b450
42 changed files with 176 additions and 302 deletions

1
.gitignore vendored
View File

@@ -20,4 +20,5 @@ yarn-debug.log*
yarn-error.log*
.tmp/
awesome/
awesome.md

View File

@@ -8,7 +8,7 @@ all: build
.PHONY: create_dir
create_dir:
mkdir -p .tmp awesome
mkdir -p .tmp
.PHONY: clone_awesome
clone_awesome: create_dir

View File

@@ -1,13 +0,0 @@
---
date: "2016-12-01T16:00:00+02:00"
title: "Administration"
slug: "administration"
sidebar_position: 30
menu:
sidebar:
name: "Administration"
sidebar_position: 20
collapse: true
identifier: "administration"
---

View File

@@ -0,0 +1,9 @@
{
"label": "Administration",
"position": 30,
"link": {
"type": "generated-index",
"slug": "/administration",
"title": "Administration"
}
}

View File

@@ -1,12 +0,0 @@
---
date: "2021-01-22T00:00:00+02:00"
title: "Contributing"
slug: "contributing"
sidebar_position: 35
menu:
sidebar:
name: "Contributing"
sidebar_position: 50
identifier: "contributing"
---

View File

@@ -0,0 +1,9 @@
{
"label": "Contributing",
"position": 35,
"link": {
"type": "generated-index",
"slug": "/contributing",
"title": "Contributing"
}
}

View File

@@ -1,12 +0,0 @@
---
date: "2016-12-01T16:00:00+02:00"
title: "Development"
slug: "development"
sidebar_position: 40
menu:
sidebar:
name: "Development"
sidebar_position: 40
identifier: "development"
---

View File

@@ -0,0 +1,9 @@
{
"label": "Development",
"position": 40,
"link": {
"type": "generated-index",
"slug": "/development",
"title": "Development"
}
}

View File

@@ -1,12 +0,0 @@
---
date: "2017-01-20T15:00:00+08:00"
title: "Help"
slug: "help"
sidebar_position: 5
menu:
sidebar:
name: "Help"
sidebar_position: 100
identifier: "help"
---

View File

@@ -0,0 +1,9 @@
{
"label": "Help",
"position": 5,
"link": {
"type": "generated-index",
"slug": "/help",
"title": "Help"
}
}

View File

@@ -1,12 +0,0 @@
---
date: "2016-12-01T16:00:00+02:00"
title: "Installation"
slug: "installation"
sidebar_position: 10
menu:
sidebar:
name: "Installation"
sidebar_position: 10
identifier: "installation"
---

View File

@@ -0,0 +1,9 @@
{
"label": "Installation",
"position": 10,
"link": {
"type": "generated-index",
"slug": "/installation",
"title": "Installation"
}
}

View File

@@ -1,12 +0,0 @@
---
date: "2016-12-27T16:00:00+02:00"
title: "Usage"
slug: "usage"
sidebar_position: 35
menu:
sidebar:
name: "Usage"
sidebar_position: 30
identifier: "usage"
---

View File

@@ -0,0 +1,9 @@
{
"label": "Usage",
"position": 35,
"link": {
"type": "generated-index",
"slug": "/usage",
"title": "Usage"
}
}

View File

@@ -211,8 +211,8 @@ const config = {
[
"@docusaurus/plugin-content-docs",
{
id: "runner",
path: "runner",
id: "runner-docs",
path: "runner-docs",
routeBasePath: "runner",
//sidebarPath: './runner/sidebars.js',
versions: {
@@ -235,8 +235,8 @@ const config = {
}) => {
return `https://gitea.com/gitea/docs/src/branch/main/${
version === "current"
? "runner"
: `runner_versioned_docs/version-${version}`
? "runner-docs"
: `runner-docs_versioned_docs/version-${version}`
}/${docPath}`;
},
async sidebarItemsGenerator({ defaultSidebarItemsGenerator, ...args }) {

View File

@@ -1,12 +0,0 @@
---
date: "2016-12-01T16:00:00+02:00"
title: "运维"
slug: "administration"
sidebar_position: 30
menu:
sidebar:
name: "运维"
sidebar_position: 20
identifier: "administration"
---

View File

@@ -0,0 +1,9 @@
{
"label": "运维",
"position": 30,
"link": {
"type": "generated-index",
"slug": "/administration",
"title": "运维"
}
}

View File

@@ -0,0 +1,9 @@
{
"label": "贡献",
"position": 35,
"link": {
"type": "generated-index",
"slug": "/contributing",
"title": "贡献"
}
}

View File

@@ -1,12 +0,0 @@
---
date: "2016-12-01T16:00:00+02:00"
title: "开发"
slug: "development"
sidebar_position: 40
menu:
sidebar:
name: "开发"
sidebar_position: 40
identifier: "development"
---

View File

@@ -0,0 +1,9 @@
{
"label": "开发",
"position": 40,
"link": {
"type": "generated-index",
"slug": "/development",
"title": "开发"
}
}

View File

@@ -1,12 +0,0 @@
---
date: "2017-01-20T15:00:00+08:00"
title: "帮助"
slug: "help"
sidebar_position: 5
menu:
sidebar:
name: "帮助"
sidebar_position: 100
identifier: "help"
---

View File

@@ -0,0 +1,9 @@
{
"label": "帮助",
"position": 5,
"link": {
"type": "generated-index",
"slug": "/help",
"title": "帮助"
}
}

View File

@@ -1,12 +0,0 @@
---
date: "2016-12-01T16:00:00+02:00"
title: "安装"
slug: "installation"
sidebar_position: 10
menu:
sidebar:
name: "安装"
sidebar_position: 10
identifier: "installation"
---

View File

@@ -0,0 +1,9 @@
{
"label": "安装",
"position": 10,
"link": {
"type": "generated-index",
"slug": "/installation",
"title": "安装"
}
}

View File

@@ -1,12 +0,0 @@
---
date: "2016-12-27T16:00:00+02:00"
title: "使用指南"
slug: "usage"
sidebar_position: 35
menu:
sidebar:
name: "使用指南"
sidebar_position: 30
identifier: "usage"
---

View File

@@ -0,0 +1,9 @@
{
"label": "使用指南",
"position": 35,
"link": {
"type": "generated-index",
"slug": "/usage",
"title": "使用指南"
}
}

View File

@@ -1,12 +0,0 @@
---
date: "2016-12-01T16:00:00+02:00"
title: "運維"
slug: "administration"
sidebar_position: 30
menu:
sidebar:
name: "運維"
sidebar_position: 20
identifier: "administration"
---

View File

@@ -0,0 +1,9 @@
{
"label": "運維",
"position": 30,
"link": {
"type": "generated-index",
"slug": "/administration",
"title": "運維"
}
}

View File

@@ -0,0 +1,9 @@
{
"label": "貢獻",
"position": 35,
"link": {
"type": "generated-index",
"slug": "/contributing",
"title": "貢獻"
}
}

View File

@@ -1,12 +0,0 @@
---
date: "2016-12-01T16:00:00+02:00"
title: "開發"
slug: "development"
sidebar_position: 40
menu:
sidebar:
name: "開發"
sidebar_position: 40
identifier: "development"
---

View File

@@ -0,0 +1,9 @@
{
"label": "開發",
"position": 40,
"link": {
"type": "generated-index",
"slug": "/development",
"title": "開發"
}
}

View File

@@ -1,12 +0,0 @@
---
date: "2017-01-20T15:00:00+08:00"
title: "幫助"
slug: "help"
sidebar_position: 5
menu:
sidebar:
name: "幫助"
sidebar_position: 100
identifier: "help"
---

View File

@@ -0,0 +1,9 @@
{
"label": "幫助",
"position": 5,
"link": {
"type": "generated-index",
"slug": "/help",
"title": "幫助"
}
}

View File

@@ -1,12 +0,0 @@
---
date: "2016-12-01T16:00:00+02:00"
title: "安裝"
slug: "installation"
sidebar_position: 10
menu:
sidebar:
name: "安裝"
sidebar_position: 10
identifier: "installation"
---

View File

@@ -0,0 +1,9 @@
{
"label": "安裝",
"position": 10,
"link": {
"type": "generated-index",
"slug": "/installation",
"title": "安裝"
}
}

View File

@@ -1,12 +0,0 @@
---
date: "2016-12-27T16:00:00+02:00"
title: "使用指南"
slug: "usage"
sidebar_position: 35
menu:
sidebar:
name: "使用指南"
sidebar_position: 30
identifier: "usage"
---

View File

@@ -0,0 +1,9 @@
{
"label": "使用指南",
"position": 35,
"link": {
"type": "generated-index",
"slug": "/usage",
"title": "使用指南"
}
}

8
runner-docs/index.mdx Normal file
View File

@@ -0,0 +1,8 @@
---
sidebar_position: 1
slug: /
---
import ActRunnerDoc from '@site/docs/usage/actions/act-runner.mdx';
<ActRunnerDoc />

View File

@@ -1,104 +0,0 @@
---
sidebar_position: 1
slug: /
---
# What is Gitea Runner
Act runner is a runner for Gitea based on [Gitea fork](https://gitea.com/gitea/act) of [act](https://github.com/nektos/act). This documentation is a copy of https://gitea.com/gitea/act_runner/src/branch/main/README.md . And it should be updated once that README changed.
## Installation
### Prerequisites
Docker Engine Community version is required for docker mode. To install Docker CE, follow the official [install instructions](https://docs.docker.com/engine/install/).
### Download pre-built binary
Visit [here](https://dl.gitea.com/act_runner/) and download the right version for your platform.
### Build from source
```bash
make build
```
### Build a docker image
```bash
make docker
```
### Register
```bash
./act_runner register
```
And you will be asked to input:
1. Gitea instance URL, like `http://192.168.8.8:3000/`. You should use your gitea instance ROOT_URL as the instance argument
and you should not use `localhost` or `127.0.0.1` as instance IP;
2. Runner token, you can get it from `http://192.168.8.8:3000/-/admin/actions/runners`;
3. Runner name, you can just leave it blank;
4. Runner labels, you can just leave it blank.
The process looks like:
```text
INFO Registering runner, arch=amd64, os=darwin, version=0.1.5.
WARN Runner in user-mode.
INFO Enter the Gitea instance URL (for example, https://gitea.com/):
http://192.168.8.8:3000/
INFO Enter the runner token:
fe884e8027dc292970d4e0303fe82b14xxxxxxxx
INFO Enter the runner name (if set empty, use hostname: Test.local):
INFO Enter the runner labels, leave blank to use the default labels (comma-separated, for example, ubuntu-latest:docker://gitea/runner-images:ubuntu-latest):
INFO Registering runner, name=Test.local, instance=http://192.168.8.8:3000/, labels=[ubuntu-latest:docker://gitea/runner-images:ubuntu-latest ubuntu-22.04:docker://gitea/runner-images:ubuntu-22.04 ubuntu-20.04:docker://gitea/runner-images:ubuntu-20.04].
DEBU Successfully pinged the Gitea instance server
INFO Runner registered successfully.
```
You can also register with command line arguments.
```bash
./act_runner register --instance http://192.168.8.8:3000 --token <my_runner_token> --no-interactive
```
If the registry succeed, it will run immediately. Next time, you could run the runner directly.
### Run
```bash
./act_runner daemon
```
### Run with docker
```bash
docker run -e GITEA_INSTANCE_URL=https://your_gitea.com -e GITEA_RUNNER_REGISTRATION_TOKEN=<your_token> -v /var/run/docker.sock:/var/run/docker.sock --name my_runner gitea/act_runner:nightly
```
### Configuration
You can also configure the runner with a configuration file.
The configuration file is a YAML file, you can generate a sample configuration file with `./act_runner generate-config`.
```bash
./act_runner generate-config > config.yaml
```
You can specify the configuration file path with `-c`/`--config` argument.
```bash
./act_runner -c config.yaml register # register with config file
./act_runner -c config.yaml daemon # run with config file
```
You can read the latest version of the configuration file online at [config.example.yaml](internal/pkg/config/config.example.yaml).
### Example Deployments
Check out the [examples](https://gitea.com/gitea/act_runner/src/branch/main/examples) directory for sample deployment types.