Skip to content

Commit

Permalink
add github workflows (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuluo-yx authored Sep 17, 2023
1 parent 0636aaf commit 2b5168a
Show file tree
Hide file tree
Showing 876 changed files with 25,552 additions and 24,015 deletions.
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ body:
attributes:
label: Would you like to fix this issue?
description: You can choose to fix this documentation issue yourself or have another contributor in the community fix it.
options: ["Yes! Please assign to me!", "No. Please assign another contributor"]
options:
["Yes! Please assign to me!", "No. Please assign another contributor"]
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/website.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ body:
attributes:
label: Would you like to fix this issue?
description: You can choose to fix this issue yourself or let other contributors in the community fix it.
options: ["Yes! Please assign to me!", "No. Please assign another contributor"]
options:
["Yes! Please assign to me!", "No. Please assign another contributor"]
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Set update schedule for GitHub Actions

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every weekday
interval: "daily"
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ Changes:

Screenshots of the change:

<!-- Add screenshots depicting the changes. -->
<!-- Add screenshots depicting the changes. -->
4 changes: 2 additions & 2 deletions .github/workflows/deploy-oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Update Cache-Control
uses: doggycool/ossutil-github-action@master
with:
ossArgs: 'set-meta oss://sca-website-cn-hongkong/ Cache-Control:no-cache -rf'
ossArgs: "set-meta oss://sca-website-cn-hongkong/ Cache-Control:no-cache -rf"
accessKey: ${{ secrets.ACCESS_KEYID }}
accessSecret: ${{ secrets.ACCESS_KEYSECRET }}
endpoint: oss-cn-hongkong.aliyuncs.com
endpoint: oss-cn-hongkong.aliyuncs.com
4 changes: 2 additions & 2 deletions .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jobs:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: ❄️ Markdown Lint

on: [pull_request]

jobs:
markdownlint:
name: 🍇 Markdown
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.1.0
- name: 🚀 Use Node.js
uses: actions/setup-node@v3
with:
node-version: "18.x"
- run: npm install -g markdownlint-cli@0.25.0
- run: markdownlint '**/*.md' --ignore node_modules
yamllint:
name: 🍏 YAML
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.1.0
- uses: actions/setup-python@v4.1.0
with:
python-version: "3.x" # Version range or exact version of a Python version to use, using SemVer's version range syntax
architecture: "x64" # optional x64 or x86. Defaults to x64 if not specified
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install yamllint
- name: 🧹 YAML Lint
run: |
yamllint .
44 changes: 44 additions & 0 deletions .github/workflows/md-link-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# This is a basic workflow to help you get started with Actions

name: Check broken links

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
# Run everyday at 9:00 AM (See https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07)
- cron: "0 5 * * *"

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
check:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3.1.0
- uses: actions/setup-node@v3
with:
node-version: "18"

- name: markdown-link-check
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: "yes"
config-file: "checklink_config.json"
max-depth: 3

- name: Archive Broken Links List
uses: actions/upload-artifact@v3
if: always()
with:
name: broken-links.json
path: /brokenLinks.json
retention-days: 5
35 changes: 35 additions & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# MD013 Line length
MD013: false

# MD014 Dollar signs used before commands without showing output
MD014: false

# MD024 Multiple headings with the same content
MD024: false

# MD026/no-trailing-punctuation Trailing punctuation in heading
MD026: false

# MD029/ol-prefix Ordered list item prefix
MD029: false

# MD033/no-inline-html
MD033: false

# MD034/no-bare-urls
MD034: false

# MD040/fenced-code-language
MD040: false

# MD041/first-line-heading/first-line-h1 First line in file should be a top level heading
MD041: false

# MD036/emphasis used instead of a header
MD036: false

# MD037/no-space-in-emphasis Spaces inside emphasis markers
MD037: false

# MD046/Two formats of code blocks are allowed: fenced and indented
MD046: false
8 changes: 8 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---

extends: default

rules:
document-start: false
line-length: false
truthy: false
92 changes: 46 additions & 46 deletions CONTRIBUTING-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,90 +5,90 @@ Before contributing to this Spring Cloud Alibaba official website documentation
## Docs must be read before writing

Here are a few questions to consider before writing documentation:
- What is the scope of the function, that is, to what extent? **
- **Which steps are easy to make mistakes for the user of the function module during the use process, should the instructions be pointed out in advance? **

- What is the scope of the function, that is, to what extent? \*\*
- ** Which steps are easy to make mistakes for the user of the function module during the use process, should the instructions be pointed out in advance? **

1. Do not use us, xxx et al. to refer to in formal written documents:

```markdown
We use the following configuration
```markdown
We use the following configuration

~~We~~ use the following configuration
```
~~We~~ use the following configuration
```

2. Appropriate punctuation marks need to be added after the end of the document (note the difference between Chinese and English symbols **Chinese:,English:**):

```markdown
When using the spring-cloud-starter-nacos-config module function, the following configuration needs to be introduced in the project pom.xml file
```markdown
When using the spring-cloud-starter-nacos-config module function, the following configuration needs to be introduced in the project pom.xml file

When using the spring-cloud-starter-nacos-config module function, the following configuration needs to be introduced in the project pom.xml file:
```
When using the spring-cloud-starter-nacos-config module function, the following configuration needs to be introduced in the project pom.xml file:
```

3. Pay attention to the writing format of proper nouns:

```markdown
spring cloud -> Spring Cloud
feign -> Feign
nacos -> Nacos
 …
```markdown
spring cloud -> Spring Cloud
feign -> Feign
nacos -> Nacos
 …

Some proper nouns need to add spaces:
DestinationRule -> Destination Rule
```
Some proper nouns need to add spaces:
DestinationRule -> Destination Rule
```

> 1. Pay attention to the part of speech when writing in English. Titles should not use verbs, generally nouns!
> 2. When proper nouns are vague, use a search engine to search to ensure correctness!
> 1. Pay attention to the part of speech when writing in English. Titles should not use verbs, generally nouns!
> 2. When proper nouns are vague, use a search engine to search to ensure correctness!
4. Note that the first letter of the module title is capitalized in English

```markdown
~~routing example~~
```markdown
~~routing example~~

Routing Example
```
Routing Example
```

5. Different content needs to be given the corresponding code block type:

```java
public static void main(String[] args) {
```java
public static void main(String[] args) {

System.out.println("test");
System.out.println("test");

}
```
}
```

```markdown
public static void main(String[] args) {
```markdown
public static void main(String[] args) {

System.out.println("test");
System.out.println("test");

}
```
}
```

6. Acronyms need to be declared before they are used (students outside the community may not know the meaning of the abbreviations):

```markdown
It means that the authentication of ~~SCA~~ has been passed.
```markdown
It means that the authentication of ~~SCA~~ has been passed.

The advance statement is: Spring Cloud Alibaba (hereinafter referred to as SCA)
```
The advance statement is: Spring Cloud Alibaba (hereinafter referred to as SCA)
```

7. Key content, such as specific configuration files and dependency names, need to be shaded:

Need to introduce spring-cloud-starter-stream-rocketmq module dependency
Need to introduce spring-cloud-starter-stream-rocketmq module dependency

Need to introduce `spring-cloud-starter-stream-rocketmq` module dependency
Need to introduce `spring-cloud-starter-stream-rocketmq` module dependency

8. Leave a space between English and Chinese to ensure readability:

```markdown
Environment~~On Nacos, you need to~~add the ~~basic configuration that corresponds to the dataId
```markdown
Environment~~On Nacos, you need to~~add the ~~basic configuration that corresponds to the dataId

In the environment, Nacos needs to add the basic configuration corresponding to dataId
```
In the environment, Nacos needs to add the basic configuration corresponding to dataId
```

9. **After writing the document, read it at least once by yourself, otherwise there is a high probability that there will be problems! Otherwise, there is a high probability that there is a problem! Otherwise, there is a high probability that there is a problem! **
9. ** After writing the document, read it at least once by yourself, otherwise there is a high probability that there will be problems! Otherwise, there is a high probability that there is a problem! Otherwise, there is a high probability that there is a problem! **

## Project run test

Expand All @@ -99,4 +99,4 @@ Here are a few questions to consider before writing documentation:

### Local deployment test

- After writing the document, run `npm run build` to build the project, and then run `npm run server` to deploy the project locally, and check the effect in the local browser to ensure that the project is built and deployed successfully.
- After writing the document, run `npm run build` to build the project, and then run `npm run server` to deploy the project locally, and check the effect in the local browser to ensure that the project is built and deployed successfully.
Loading

0 comments on commit 2b5168a

Please sign in to comment.