Skip to content

Commit b448d66

Browse files
committed
feat: add code-server
1 parent 724abc4 commit b448d66

27 files changed

Lines changed: 7026 additions & 2 deletions

.github/workflows/build.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- next
8+
- next-major
9+
- '[0-9]+.[0-9]+.x'
10+
- alpha
11+
- beta
12+
- feature/*
13+
- fix/*
14+
pull_request:
15+
branches:
16+
- main
17+
- next
18+
- next-major
19+
- '[0-9]+.[0-9]+.x'
20+
- alpha
21+
- beta
22+
workflow_dispatch:
23+
jobs:
24+
build:
25+
runs-on: ubuntu-latest
26+
27+
strategy:
28+
matrix:
29+
node-version: [ 22 ]
30+
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v4
34+
35+
- name: Setup Node.js
36+
uses: actions/setup-node@v4
37+
with:
38+
node-version: ${{ matrix.node-version }}
39+
40+
- name: Install dependencies
41+
run: npm ci
42+
43+
- name: Build-astro
44+
run: npm run build
45+
46+
- name: Build-shell
47+
run: make lint
48+

.github/workflows/ghpage.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: gendocs-and-deploy-docs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_run:
8+
workflows:
9+
- release-and-publish
10+
types:
11+
- completed
12+
workflow_dispatch:
13+
14+
jobs:
15+
build-and-deploy:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: 22
28+
29+
- name: Install dependencies
30+
run: npm ci
31+
32+
- name: Generate pages
33+
run: npm run build
34+
35+
- name: Copy files
36+
run: cp code-server dist/get/index.html
37+
38+
- name: Deploy to GitHub Pages
39+
uses: peaceiris/actions-gh-pages@v3
40+
with:
41+
github_token: ${{ secrets.GITHUB_TOKEN }}
42+
publish_dir: ./dist

.github/workflows/reelase.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: release-and-publish
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: 22
19+
registry-url: 'https://registry.npmjs.org/'
20+
21+
- name: Install dependencies
22+
run: npm ci
23+
24+
- name: Build-astro
25+
run: npm run build
26+
27+
- name: Build-shell
28+
run: make lint
29+
30+
- name: Get Tag Version
31+
id: get_version
32+
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
33+
34+
- name: Update version for package.json
35+
run: |
36+
jq '.version = "${{ env.VERSION }}"' package.json > temp.json && mv temp.json package.json
37+
38+
- name: dist
39+
run: tar -zcvf dist.tgz dist
40+
41+
- name: Create GitHub Release
42+
uses: softprops/action-gh-release@v2
43+
with:
44+
tag_name: v${{ env.VERSION }}
45+
name: Release v${{ env.VERSION }}
46+
generate_release_notes: true
47+
draft: false
48+
prerelease: false
49+
files: |
50+
*.tgz code-server

.gitignore

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
# build output
2+
dist/
3+
4+
# generated types
5+
.astro/
6+
7+
# vscode
8+
.vscode/
9+
10+
# Logs
11+
logs
12+
*.log
13+
npm-debug.log*
14+
yarn-debug.log*
15+
yarn-error.log*
16+
lerna-debug.log*
17+
.pnpm-debug.log*
18+
19+
# Diagnostic reports (https://nodejs.org/api/report.html)
20+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
21+
22+
# Runtime data
23+
pids
24+
*.pid
25+
*.seed
26+
*.pid.lock
27+
28+
# Directory for instrumented libs generated by jscoverage/JSCover
29+
lib-cov
30+
31+
# Coverage directory used by tools like istanbul
32+
coverage
33+
*.lcov
34+
35+
# nyc test coverage
36+
.nyc_output
37+
38+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
39+
.grunt
40+
41+
# Bower dependency directory (https://bower.io/)
42+
bower_components
43+
44+
# node-waf configuration
45+
.lock-wscript
46+
47+
# Compiled binary addons (https://nodejs.org/api/addons.html)
48+
build/Release
49+
50+
# Dependency directories
51+
node_modules/
52+
jspm_packages/
53+
54+
# Snowpack dependency directory (https://snowpack.dev/)
55+
web_modules/
56+
57+
# TypeScript cache
58+
*.tsbuildinfo
59+
60+
# Optional npm cache directory
61+
.npm
62+
63+
# Optional eslint cache
64+
.eslintcache
65+
66+
# Optional stylelint cache
67+
.stylelintcache
68+
69+
# Microbundle cache
70+
.rpt2_cache/
71+
.rts2_cache_cjs/
72+
.rts2_cache_es/
73+
.rts2_cache_umd/
74+
75+
# Optional REPL history
76+
.node_repl_history
77+
78+
# Output of 'npm pack'
79+
*.tgz
80+
81+
# Yarn Integrity file
82+
.yarn-integrity
83+
84+
# dotenv environment variable files
85+
.env
86+
.env.development.local
87+
.env.test.local
88+
.env.production.local
89+
.env.local
90+
91+
# parcel-bundler cache (https://parceljs.org/)
92+
.cache
93+
.parcel-cache
94+
95+
# Next.js build output
96+
.next
97+
out
98+
99+
# Nuxt.js build / generate output
100+
.nuxt
101+
dist
102+
103+
# Gatsby files
104+
.cache/
105+
# Comment in the public line in if your project uses Gatsby and not Next.js
106+
# https://nextjs.org/blog/next-9-1#public-directory-support
107+
# public
108+
109+
# vuepress build output
110+
.vuepress/dist
111+
112+
# vuepress v2.x temp and cache directory
113+
.temp
114+
.cache
115+
116+
# vitepress build output
117+
**/.vitepress/dist
118+
119+
# vitepress cache directory
120+
**/.vitepress/cache
121+
122+
# Docusaurus cache and generated files
123+
.docusaurus
124+
125+
# Serverless directories
126+
.serverless/
127+
128+
# FuseBox cache
129+
.fusebox/
130+
131+
# DynamoDB Local files
132+
.dynamodb/
133+
134+
# TernJS port file
135+
.tern-port
136+
137+
# Stores VSCode versions used for testing VSCode extensions
138+
.vscode-test
139+
140+
# yarn v2
141+
.yarn/cache
142+
.yarn/unplugged
143+
.yarn/build-state.yml
144+
.yarn/install-state.gz
145+
.pnp.*

Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
TARGET = code-server
2+
SHFMT_OPTS = -i 2 -ci -w
3+
SHELLCHECK_OPTS =
4+
BATS_OPTS =
5+
6+
.PHONY: all
7+
all: fmt lint
8+
9+
.PHONY: fmt
10+
fmt: $(TARGET)
11+
shfmt $(SHFMT_OPTS) $?
12+
13+
.PHONY: lint
14+
lint: $(TARGET)
15+
shellcheck $(SHELLCHECK_OPTS) $?

NOTICE

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
code
2+
Copyright 2025 rising3(Michio Nakagawa)
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.

README.md

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,32 @@
1-
# code-server
2-
vscode server
1+
# vscode systemd.service
2+
[![Build](https://github.com/rising3/code/actions/workflows/build.yml/badge.svg)](https://github.com/rising3/code/actions/workflows/build.yml)
3+
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE)
4+
5+
A smart entity that implements generic methods such as clone(), toJSON(), and fromJSON().
6+
7+
## Requirements
8+
9+
- systemd
10+
- aws
11+
- code
12+
13+
## How to install
14+
15+
To install:
16+
17+
``` bash
18+
curl -s "https://rising3.github.io/code/get/" | bash
19+
```
20+
## How to build from source
21+
22+
```sh
23+
git clone https://github.com/rising3/code.git
24+
cd code
25+
npm i
26+
npm run test
27+
npm run build
28+
```
29+
30+
## License
31+
32+
[Apache 2.0](LICENSE)

astro.config.mjs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// @ts-check
2+
import { defineConfig } from "astro/config";
3+
import tailwindcss from "@tailwindcss/vite";
4+
5+
import mdx from "@astrojs/mdx";
6+
7+
export default defineConfig({
8+
site: 'https://rising3.github.io',
9+
base: '/code',
10+
integrations: [mdx()],
11+
vite: {
12+
plugins: [tailwindcss()],
13+
},
14+
});

0 commit comments

Comments
 (0)