Skip to content

Commit

Permalink
Merge branch 'master' into check-broken-exernal-urls
Browse files Browse the repository at this point in the history
  • Loading branch information
yurisasuke authored Nov 26, 2024
2 parents caef11c + 98b4bc0 commit 7871fe9
Show file tree
Hide file tree
Showing 389 changed files with 39,221 additions and 21,584 deletions.
21 changes: 0 additions & 21 deletions .github/workflows/docsearch.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/navigation-levels.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Check maximum nesting level is not exceeded
on: [pull_request]
env:
MAX_LEVELS: 7
MAX_LEVELS: 9

jobs:
Check-max-levels:
Expand Down
74 changes: 74 additions & 0 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# This GitHub Action is triggered on pull requests to:
# 1. Format changed files using Prettier.
# 2. Automatically install Prettier and its Go template plugin.
# 3. Identify all files changed in the pull request.
# 4. Format the changed files according to Prettier's rules, respecting the .prettierignore file.
# 5. Commit any changes made to the files back to the repository.
# 6. Optionally, check that the files are properly formatted after linting.
#
# This action helps ensure code quality and consistency in documentation and source files.
name: "PR files Formatting"
on:
workflow_dispatch:
jobs:
docs_linter:
runs-on: ubuntu-latest
name: Format PR files with Prettier
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }} # Automatically checks out the PR branch
token: ${{ secrets.ORG_GH_TOKEN }}
- name: Get Head Commit Message
id: get_head_commit_message
run: echo "HEAD_COMMIT_MESSAGE=$(git show -s --format=%s)" >> "$GITHUB_OUTPUT"

- name: Check for Skip Linter Marker
id: check_skip_marker
run: |
if [[ "${{ steps.get_head_commit_message.outputs.HEAD_COMMIT_MESSAGE }}" == *"[skip-linter-43n2w]"* ]]; then
echo "Skipping linter due to marker."
echo "skip_linter=true" >> "$GITHUB_ENV" # Set an environment variable
fi
- uses: actions/setup-node@v4
with:
node-version: 20
# Install Prettier and dependencies
- name: Install dependencies
if: env.skip_linter != 'true' # Only run if the skip marker is not found
run: |
npm install [email protected] prettier-plugin-go-template
# Fetch the base branch and compare changes
- name: Get changed files
id: changed-files
if: env.skip_linter != 'true' # Only run if the skip marker is not found
uses: tj-actions/changed-files@v45

- name: Lint all changed files
if: env.skip_linter != 'true' # Only run if the skip marker is not found
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
for file in ${ALL_CHANGED_FILES}; do
npx prettier --config .prettierrc --write "$file"
echo "$file was changed"
done
# Auto commit the changes if any
- uses: stefanzweifel/git-auto-commit-action@v5
if: env.skip_linter != 'true' # Only run if the skip marker is not found
with:
# skip-linter-43n2w is a Marker to skip rerun of the linter once it makes a commit
# This prevents cyclic run of the linter
commit_message: save content formatted by prettier linter [skip-linter-43n2w]

- name: Check all changed files are linted
if: env.skip_linter != 'true' # Only run if the skip marker is not found
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
for file in ${ALL_CHANGED_FILES}; do
npx prettier --config .prettierrc --check "$file"
echo "$file was linted"
done
4 changes: 2 additions & 2 deletions .github/workflows/stable-updater.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ name: Stable branch update
on:
push:
branches:
- release-5.5
- release-5.6

jobs:
stable:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/release-5.5'
if: github.ref == 'refs/heads/release-5.6'
steps:
- uses: actions/checkout@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tyk-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Restore artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4.1.7

- name: Set up env
run: |
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ resources
.vscode/launch.json*
check-pages-*.txt
.venv/
node_modules/
node_modules
package-lock.json
package.json
changed-files.txt
2 changes: 1 addition & 1 deletion .htmltest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ DirectoryPath: "tyk-docs/public"
IgnoreAltMissing: true
IgnoreAltEmpty: true
IgnoreDirectoryMissingTrailingSlash: true
CheckInternalHash: false
CheckInternalHash: true
IgnoreEmptyHref: true
CheckExternal: true
IgnoreURLs:
Expand Down
11 changes: 11 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Ignore artifacts:
tyk-docs/public
tyk-docs/resources
tyk-docs/themes/tykio/layouts/_default/list.netlify.json
tyk-docs/themes/tykio/layouts/_default/list.pagesurl.json
tyk-docs/themes/tykio/layouts/_default/list.urlcheck.json
.gitignore
.prettierignore
.prettierrc
changed-files.txt
.github
31 changes: 31 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"plugins": [
"prettier-plugin-go-template"
],
"printWidth": 120,
"proseWrap": "always",
"tabWidth": 2,
"useTabs": false,
"overrides": [
{
"files": [
"*.html"
],
"options": {
"parser": "go-template",
"goTemplateBracketSpacing": true,
"bracketSameLine": true
}
},
{
"files": [
"*.js",
"*.ts"
],
"options": {
"singleQuote": false
}
}
]
}

7 changes: 6 additions & 1 deletion scripts/page_available_since.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
versions = [
{
"path": "/docs/",
"name": "5.5 - Latest",
"name": "5.6 - Latest",
"branch": "release-5.6"
},
{
"path": "/docs/5.5/",
"name": "5.5",
"branch": "release-5.5"
},
{
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed tyk-docs/assets/img/2.10/portal-home-page-add.png
Binary file not shown.
Binary file not shown.
Binary file removed tyk-docs/assets/img/2.10/portal_menu.png
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tyk-docs/assets/img/cloud/create-api-tyk-cloud.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tyk-docs/assets/img/cloud/tyk-cloud-add-key.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tyk-docs/assets/img/cloud/tyk-cloud-add-policy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tyk-docs/assets/img/cloud/tyk-cloud-api-auth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tyk-docs/assets/img/cloud/tyk-cloud-copy-key-url.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tyk-docs/assets/img/cloud/tyk-cloud-create-api.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tyk-docs/assets/img/cloud/tyk-cloud-key-access-rights.png
Binary file modified tyk-docs/assets/img/cloud/tyk-cloud-key-configurations.png
Binary file modified tyk-docs/assets/img/cloud/tyk-cloud-policy-access-rights.png
Binary file modified tyk-docs/assets/img/cloud/tyk-cloud-policy-configurations.png
Binary file added tyk-docs/assets/img/cloud/tyk-cloud-save-api.png
Binary file modified tyk-docs/assets/img/cloud/tyk-cloud-select-cloud-gateway.png
Binary file modified tyk-docs/assets/img/diagrams/oss-flow.png
Loading

0 comments on commit 7871fe9

Please sign in to comment.