fix: add mermaid config (#4643)

Signed-off-by: Rui Chen <rui@chenrui.dev>
This commit is contained in:
Rui Chen
2024-06-09 19:34:20 -04:00
committed by GitHub
parent a4dd2bd83a
commit 91ff643727
13 changed files with 5050 additions and 36 deletions

2
.github/labeler.yml vendored
View File

@@ -42,4 +42,4 @@ website:
- changed-files:
- any-glob-to-any-file: 'runatlantis.io/.vitepress/**/*'
- any-glob-to-any-file: 'package.json'
- any-glob-to-any-file: 'pnpm-lock.yaml'
- any-glob-to-any-file: 'package-lock.json'

View File

@@ -18,7 +18,7 @@
postUpdateOptions: [
'gomodTidy',
'gomodUpdateImportPaths',
'pnpmDedupe',
'npmDedupe',
],
prHourlyLimit: 1,
minimumReleaseAge: '5 days',

View File

@@ -33,7 +33,7 @@ jobs:
filters: |
src:
- '**.js'
- 'pnpm-lock.yaml'
- 'package-lock.json'
- 'package.json'
- '.github/workflows/website.yml'
@@ -54,9 +54,11 @@ jobs:
config: .markdownlint.yaml
globs: 'runatlantis.io/**/*.md'
- uses: wyvox/action-setup-pnpm@6597ef5c1300fe08efa6bc75e6141f7153e2b4cc # v3
- name: setup npm
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
with:
node-version: 20
node-version: '20'
cache: 'npm'
- name: run http-server
env:
@@ -67,16 +69,16 @@ jobs:
curl -Ls https://github.com/raviqqe/muffet/releases/download/v${MUFFET_VERSION}/muffet_linux_amd64.tar.gz | tar -xz
# build site
pnpm install
pnpm website:build
npm install
npm run website:build
# start http-server for integration testing
npx http-server runatlantis.io/.vitepress/dist &
- name: Run Playwright E2E tests
run: |
pnpx playwright install --with-deps
pnpm run e2e
npx playwright install --with-deps
npm run e2e
- name: wait until server listened
run: curl --retry-delay 1 --retry 30 --retry-all-error http://localhost:8080

1
.gitignore vendored
View File

@@ -15,7 +15,6 @@ atlantis
.devcontainer
atlantis.env
*.act
package-lock.json
Dockerfile.local
# gitreleaser

View File

@@ -1 +1 @@
pnpm 9.1.4
npm v10.7.0

View File

@@ -29,7 +29,7 @@
We take security issues seriously. Please report a security vulnerability to the maintainers using [private vulnerability reporting](https://github.com/runatlantis/atlantis/security/advisories/new).
# Updating The Website
* To view the generated website locally, run `pnpm website:dev` and then
* To view the generated website locally, run `npm website:dev` and then
open your browser to http://localhost:8080.
* The website will be regenerated when your pull request is merged to main.

View File

@@ -110,4 +110,4 @@ end-to-end-tests: ## Run e2e tests
.PHONY: website-dev
website-dev: ## Run runatlantic.io on localhost:8080
pnpm website:dev
npm website:dev

View File

@@ -1,32 +1,32 @@
# Netlify Config, https://www.netlify.com/docs/netlify-toml-reference/
[build]
base = "/"
publish = "runatlantis.io/.vitepress/dist/"
command = "pnpm install && pnpm website:build"
base = "/"
command = "npm install && npm run website:build"
publish = "runatlantis.io/.vitepress/dist/"
[[redirects]]
from = "/guide/getting-started.html"
to = "/guide/"
status = 301
force = true
force = true
from = "/guide/getting-started.html"
status = 301
to = "/guide/"
[[redirects]]
from = "/docs/atlantis-yaml-reference.html"
to = "/docs/repo-level-atlantis-yaml.html"
status = 301
force = true
force = true
from = "/docs/atlantis-yaml-reference.html"
status = 301
to = "/docs/repo-level-atlantis-yaml.html"
[[headers]]
for = "/*"
[headers.values]
X-Frame-Options = "DENY"
X-XSS-Protection = "1; mode=block"
Cache-Control = "public, max-age=86400"
Strict-Transport-Security = "max-age=86400; includeSubDomains; preload"
Referrer-Policy = "no-referrer"
X-Content-Type-Options = "nosniff"
for = "/*"
[headers.values]
Cache-Control = "public, max-age=86400"
Referrer-Policy = "no-referrer"
Strict-Transport-Security = "max-age=86400; includeSubDomains; preload"
X-Content-Type-Options = "nosniff"
X-Frame-Options = "DENY"
X-XSS-Protection = "1; mode=block"
[[headers]]
for = "*.html"
[headers.values]
Content-Type = "text/html; charset=UTF-8"
for = "*.html"
[headers.values]
Content-Type = "text/html; charset=UTF-8"

4113
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -7,8 +7,10 @@
"@vueuse/core": "^10.9.0",
"markdown-it-footnote": "^4.0.0",
"markdownlint-cli": "^0.40.0",
"mermaid": "^10.9.1",
"sitemap-ts": "~1.6.1",
"vitepress": "~1.1.4",
"vitepress-plugin-mermaid": "^2.0.16",
"vue": "^3.4.27"
},
"scripts": {

891
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -3,9 +3,10 @@ import footnote from 'markdown-it-footnote'
import { defineConfig } from 'vitepress';
import * as navbars from "./navbars";
import * as sidebars from "./sidebars";
import { withMermaid } from "vitepress-plugin-mermaid";
// https://vitepress.dev/reference/site-config
export default defineConfig({
const config = defineConfig({
title: 'Atlantis',
description: 'Atlantis: Terraform Pull Request Automation',
lang: 'en-US',
@@ -128,3 +129,5 @@ export default defineConfig({
}
}
})
export default withMermaid(config)

View File

@@ -626,19 +626,23 @@ The `multienv` command allows you to set dynamic number of multiple environment
to all steps defined **below** the `multienv` step.
Compact:
```yaml
- multienv: custom-command
```
| Key | Type | Default | Required | Description |
|----------|--------|---------|----------|------------------------------------------------------------|
| multienv | string | none | no | Run a custom command and add printed environment variables |
Full:
```yaml
- multienv:
command: custom-command
output: show
```
| Key | Type | Default | Required | Description |
|------------------|-----------------------|---------|----------|-------------------------------------------------------------------------------------|
| multienv | map[string -> string] | none | no | Run a custom command and add printed environment variables |