Skip to content

Commit a524c94

Browse files
authored
Merge pull request #55 from SovereignCloudStack/feat/merge-docs-page
Add source code of docs-page/main
2 parents cbd96ff + 9c04cdf commit a524c94

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+17899
-805
lines changed

.eslintrc.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
es2021: true
5+
},
6+
extends: ['plugin:react/recommended', 'standard-with-typescript'],
7+
overrides: [
8+
{
9+
files: 'docs/*.md',
10+
parser: 'eslint-plugin-markdownlint/parser',
11+
extends: 'plugin:markdownlint/recommended'
12+
}
13+
],
14+
parserOptions: {
15+
ecmaVersion: 'latest',
16+
sourceType: 'module'
17+
},
18+
plugins: ['react']
19+
}

.github/workflows/build.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Build
2+
on:
3+
workflow_dispatch:
4+
pull_request:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout Repository
11+
uses: actions/checkout@v3
12+
with:
13+
ref: ${{ github.head_ref }}
14+
- name: Setup Node
15+
uses: actions/setup-node@v3
16+
with:
17+
node-version: 16
18+
- name: Cache dependencies
19+
uses: actions/cache@v3
20+
with:
21+
path: ~/.npm
22+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
23+
restore-keys: |
24+
${{ runner.os }}-node-
25+
- name: Install dependencies
26+
run: npm install
27+
- name: build page
28+
run: npm run build
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build and Deploy to Github Pages
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 0 * * *"
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build_and_deploy:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout Repository
16+
uses: actions/checkout@v3
17+
with:
18+
ref: ${{ github.head_ref }}
19+
20+
- name: Setup Node
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: 16
24+
25+
- name: Cache dependencies
26+
uses: actions/cache@v3
27+
with:
28+
path: ~/.npm
29+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
30+
restore-keys: |
31+
${{ runner.os }}-node-
32+
33+
- name: Install dependencies and build page
34+
run: |
35+
npm ci
36+
npm run build
37+
38+
- name: Deploy
39+
uses: peaceiris/actions-gh-pages@v3
40+
with:
41+
publish_dir: ./build
42+
github_token: ${{ secrets.GITHUB_TOKEN }}
43+
force_orphan: true
44+
user_name: 'github-actions[bot]'
45+
user_email: 'github-actions[bot]@users.noreply.github.com'
46+
commit_message: 'Update SCS Docs Page'
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Build and Deploy to staging Branch
2+
3+
on:
4+
push:
5+
branches:
6+
- staging
7+
workflow_dispatch:
8+
9+
jobs:
10+
build_and_staging:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Repository
14+
uses: actions/checkout@v3
15+
with:
16+
ref: ${{ github.ref_name }}
17+
18+
- name: Setup Node
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: 16
22+
23+
- name: Cache dependencies
24+
uses: actions/cache@v3
25+
with:
26+
path: ~/.npm
27+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
28+
restore-keys: |
29+
${{ runner.os }}-node-
30+
31+
- name: Install dependencies and build page
32+
run: |
33+
npm ci
34+
npm run build
35+
36+
- name: Deploy
37+
uses: peaceiris/actions-gh-pages@v3
38+
with:
39+
publish_dir: ./build
40+
github_token: ${{ secrets.GITHUB_TOKEN }}
41+
force_orphan: true
42+
user_name: 'github-actions[bot]'
43+
user_email: 'github-actions[bot]@users.noreply.github.com'
44+
commit_message: 'Update SCS Docs Page'
45+
publish_branch: gh-pages-staging

.github/workflows/pr-markdownlint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ jobs:
3838

3939

4040
- name: Install all npm packages
41-
run: npm ci
41+
run: npm install
4242

4343
- name: Lint markdown files
4444
run: |
45-
npm run lint:md ${files_to_lint}
45+
npm run lint:md ${files_to_lint}

.gitignore

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,34 @@
1+
# Content Dependencies from docs.package.json
2+
/repo_to_be_edited_
3+
/community/community
4+
/docs/openstack-image-manager
5+
/docs/operations
6+
/docs/release-notes
7+
/docs/testbed
8+
/docs/k8s-cluster-api-provider
9+
/docs/status-page-openapi
10+
/standards/*
11+
/docs/*.md
12+
!/standards/index.md
13+
14+
15+
# Dependencies
16+
node_modules
17+
18+
# Production
19+
/build
20+
21+
# Generated files
22+
.docusaurus
23+
.cache-loader
24+
25+
# Misc
126
.DS_Store
2-
node_modules
27+
.env.local
28+
.env.development.local
29+
.env.test.local
30+
.env.production.local
31+
32+
npm-debug.log*
33+
yarn-debug.log*
34+
yarn-error.log*

.markdownlint-cli2.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@
5151
}
5252
},
5353
"customRules": ["markdownlint-rule-search-replace"],
54-
"ignores": ["node_modules", ".github"]
54+
"ignores": ["node_modules", ".github", "docs"]
5555
}

LICENSE-CODE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) Facebook, Inc. and its affiliates.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)