Skip to content

Commit

Permalink
feat: rebuild whole site (#473)
Browse files Browse the repository at this point in the history
* feat: rebuild site

* chore: tweaks

* fix: fix docsearch

* fix: fix action button

* chore: remove homepage icons suggested by @CritasWang

* chore: add missing license

* chore: tweaks

* fix: fix table

* chore: fix table

* chore: tweaks

* chore: tweaks

* chore: tweaks
  • Loading branch information
Mister-Hope authored Dec 16, 2024
1 parent fc72b4e commit 4c492fe
Show file tree
Hide file tree
Showing 215 changed files with 3,306 additions and 4,123 deletions.
15 changes: 7 additions & 8 deletions .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,24 @@
# under the License.
#


notifications:
issues: [email protected]
issues: [email protected]
pullrequests: [email protected]

github:
description: "Apache IoTDB Documentation and Site"
description: 'Apache IoTDB Documentation and Site'
homepage: https://iotdb.apache.org/
labels:
- timeseries
- database
- documentation
enabled_merge_buttons:
# enable squash button:
squash: true
squash: true
# enable merge button:
merge: false
merge: false
# disable rebase button:
rebase: true
rebase: true
collaborators:
- CritasWang
- krystal-xiao
Expand All @@ -44,7 +43,7 @@ github:

staging:
profile: ~
whoami: asf-staging
whoami: asf-staging

publish:
whoami: asf-site
whoami: asf-site
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

74 changes: 0 additions & 74 deletions .eslintrc.cjs

This file was deleted.

32 changes: 15 additions & 17 deletions .github/workflows/site-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,22 @@ jobs:

steps:
- uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
package_json_file: 'package.json'
run_install: true
version: 8
- name: Use Node.js 20

- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
node-version: 22

- name: Install dependencies
run: pnpm install

- name: Test build website
env:
NODE_OPTIONS: --max_old_space_size=8192
run: pnpm run build
NODE_OPTIONS: --max_old_space_size=8192
run: pnpm build

deploy:
runs-on: ubuntu-latest
Expand All @@ -50,21 +49,20 @@ jobs:

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
package_json_file: 'package.json'
run_install: true
version: 8

- name: Use Node.js 20
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22

- name: Install dependencies
run: pnpm install

- name: Build website
env:
NODE_OPTIONS: --max_old_space_size=8192
run: pnpm run build
NODE_OPTIONS: --max_old_space_size=8192
run: pnpm build

- name: Deploy website
env:
IOTDB_WEBSITE_BUILD: ${{ secrets.IOTDB_WEBSITE_BUILD }}
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ pnpm-lock.yaml
# Editor directories and files
.vscode/*
!.vscode/extensions.json
!.vscode/settings.json
.idea
*.suo
*.ntvs*
Expand Down
57 changes: 30 additions & 27 deletions deploy.cjs
Original file line number Diff line number Diff line change
@@ -1,32 +1,35 @@
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

const ghpages = require('gh-pages');

ghpages.publish('src/.vuepress/dist', {
branch: 'asf-site',
repo: 'https://github.com/apache/iotdb-website.git',
message: 'Site checkin for project iotdb-website',
dotfiles: true,
}, (err) => {
if (err instanceof Error) {
console.error(err);
process.exit(1);
}
});
ghpages.publish(
'src/.vuepress/dist',
{
branch: 'asf-site',
repo: 'https://github.com/apache/iotdb-website.git',
message: 'Site checkin for project iotdb-website',
dotfiles: true,
},
(err) => {
if (err instanceof Error) {
console.error(err);
process.exit(1);
}
},
);
57 changes: 30 additions & 27 deletions deploy_staging.cjs
Original file line number Diff line number Diff line change
@@ -1,32 +1,35 @@
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

const ghpages = require('gh-pages');

ghpages.publish('src/.vuepress/dist', {
branch: 'asf-staging',
repo: 'https://github.com/apache/iotdb-website.git',
message: 'Site checkin for project iotdb-website',
dotfiles: true,
}, (err) => {
if (err instanceof Error) {
console.error(err);
process.exit(1);
}
});
ghpages.publish(
'src/.vuepress/dist',
{
branch: 'asf-staging',
repo: 'https://github.com/apache/iotdb-website.git',
message: 'Site checkin for project iotdb-website',
dotfiles: true,
},
(err) => {
if (err instanceof Error) {
console.error(err);
process.exit(1);
}
},
);
66 changes: 66 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import jsConfig from '@eslint/js';
import pluginVue from 'eslint-plugin-vue';
import globals from 'globals';
import { config, plugin, configs as tsConfigs } from 'typescript-eslint';

export default config(
{
ignores: [
'dist/**',
'node_modules/**',
'!src/.vuepress/**',
'src/.vuepress/.cache/**',
'src/.vuepress/.temp/**',
'src/.vuepress/public/**',
],
},

{
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
parserOptions: {
extraFileExtensions: ['.vue'],
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
},

jsConfig.configs.recommended,
...tsConfigs.strict,

{
files: ['**/*.ts', '**/*.cts', '**/*.mts'],
plugins: {
'@typescript-eslint': plugin,
},
},
...pluginVue.configs['flat/recommended'],

{
files: ['**/*.{js,cjs,mjs,jsx}'],
...tsConfigs.disableTypeChecked,
},

{
files: ['**/*.cjs'],
rules: {
'@typescript-eslint/no-require-imports': 'off',
},
},

{
files: ['**/*.vue'],
rules: {
'vue/max-attributes-per-line': 'off',
},
},

{
files: ['deploy.cjs', 'deploy_staging.cjs'],
languageOptions: {
globals: globals.node,
},
},
);
Loading

0 comments on commit 4c492fe

Please sign in to comment.