Skip to content

Commit e6e04ab

Browse files
committed
Add Pages deployment and project notice
1 parent c437898 commit e6e04ab

4 files changed

Lines changed: 73 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Deploy GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: pages
16+
cancel-in-progress: false
17+
18+
jobs:
19+
build:
20+
name: Build
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: 22
30+
cache: npm
31+
32+
- name: Install dependencies
33+
run: npm ci
34+
35+
- name: Build website
36+
run: npm run build
37+
38+
- name: Upload Pages artifact
39+
uses: actions/upload-pages-artifact@v3
40+
with:
41+
path: build
42+
43+
deploy:
44+
name: Deploy
45+
needs: build
46+
runs-on: ubuntu-latest
47+
environment:
48+
name: github-pages
49+
url: ${{ steps.deployment.outputs.page_url }}
50+
steps:
51+
- name: Deploy to GitHub Pages
52+
id: deployment
53+
uses: actions/deploy-pages@v4

.xlings.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"$schema-comment": "Development dependencies for the OpenXlings website. Run `xlings install` from the repository root to prepare the local toolchain.",
3+
"projectScope": false,
4+
"mirror": "GLOBAL",
5+
"workspace": {
6+
"node": "22.17.1"
7+
}
8+
}

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@ OpenXlings organization website and xlings documentation, built with Docusaurus.
55
## Development
66

77
```bash
8+
xlings install
89
npm install
910
npm run start
1011
```
1112

13+
`xlings install` reads [`.xlings.json`](.xlings.json) and installs the Node.js
14+
toolchain expected by this project.
15+
1216
## Validate
1317

1418
```bash

docusaurus.config.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ const config: Config = {
5858
colorMode: {
5959
respectPrefersColorScheme: true,
6060
},
61+
announcementBar: {
62+
id: 'platform-status',
63+
content:
64+
'xlings 当前在 Linux 平台适配较好,macOS 和 Windows 平台正在逐步适配中。',
65+
backgroundColor: '#0f766e',
66+
textColor: '#ffffff',
67+
isCloseable: true,
68+
},
6169
navbar: {
6270
title: 'OpenXlings',
6371
// logo: { alt: 'OpenXlings Logo', src: 'img/logo.svg' },

0 commit comments

Comments
 (0)