Skip to content
This repository was archived by the owner on Mar 13, 2024. It is now read-only.

Commit ef6e30b

Browse files
committed
chore: import documentation site
0 parents  commit ef6e30b

File tree

91 files changed

+2861
-0
lines changed

Some content is hidden

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

91 files changed

+2861
-0
lines changed

.eleventy.js

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
const htmlmin = require("html-minifier");
2+
const markdownIt = require('markdown-it');
3+
const pluginRss = require("@11ty/eleventy-plugin-rss");
4+
5+
module.exports = function (eleventyConfig) {
6+
// PLUGINS
7+
eleventyConfig.addPlugin(pluginRss);
8+
9+
// shortcode to render markdown from string => {{ STRING | markdown | safe }}
10+
eleventyConfig.addFilter('markdown', function(value) {
11+
let markdown = require('markdown-it')({
12+
html: true
13+
});
14+
return markdown.render(value);
15+
});
16+
17+
// rebuild on CSS changes
18+
eleventyConfig.addWatchTarget('./src/_includes/css/');
19+
20+
// Markdown
21+
eleventyConfig.setLibrary(
22+
'md',
23+
markdownIt({
24+
html: true,
25+
breaks: true,
26+
linkify: true,
27+
typographer: true
28+
})
29+
)
30+
31+
//create collections
32+
eleventyConfig.addCollection('sections', async (collection) => {
33+
return collection.getFilteredByGlob('./src/sections/*.md');
34+
});
35+
36+
// STATIC FILES
37+
eleventyConfig.addPassthroughCopy({ './src/static/': '/' });
38+
39+
// TRANSFORM -- Minify HTML Output
40+
eleventyConfig.addTransform("htmlmin", function(content, outputPath) {
41+
if( outputPath && outputPath.endsWith(".html") ) {
42+
let minified = htmlmin.minify(content, {
43+
useShortDoctype: true,
44+
removeComments: true,
45+
collapseWhitespace: true
46+
});
47+
return minified;
48+
}
49+
return content;
50+
});
51+
52+
return {
53+
dir: {
54+
input: 'src',
55+
output: 'public',
56+
data: './_data',
57+
includes: './_includes',
58+
layouts: './_layouts'
59+
},
60+
templateFormats: [
61+
'md',
62+
'njk',
63+
'11ty.js'
64+
],
65+
htmlTemplateEngine: 'njk'
66+
};
67+
};

.github/workflows/deploy-docs.yml

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Deploy Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build_and_test:
10+
name: Deploy docs
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Install Cosign
14+
uses: sigstore/[email protected]
15+
- name: Install ChainLoop
16+
run: |
17+
curl -sfL https://chainloop.dev/install.sh | bash -s -- --version v${{ env.CL_VERSION }}
18+
sudo install chainloop /usr/local/bin
19+
chainloop version
20+
- name: Write Cosign key
21+
run: echo "$COSIGN_KEY" > /tmp/cosign.key
22+
env:
23+
COSIGN_KEY: ${{ secrets.COSIGN_KEY }}
24+
- uses: actions/checkout@v3
25+
- name: Initialize Attestation
26+
run: |
27+
chainloop attestation init
28+
- uses: actions/setup-node@v3
29+
with:
30+
node-version: 16
31+
- name: npm install docs
32+
run: cd docs && npm install
33+
- name: Build Docs
34+
run: cd docs && netlify build
35+
- name: Deploy Docs
36+
run: cd docs && netlify deploy --prod
37+
- name: Finish and Record Attestation
38+
if: ${{ success() }}
39+
run: |
40+
chainloop attestation push --key /tmp/cosign.key
41+
env:
42+
CHAINLOOP_SIGNING_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
43+
- name: Mark attestation as failed
44+
if: ${{ failure() }}
45+
run: |
46+
chainloop attestation reset
47+
- name: Mark attestation as cancelled
48+
if: ${{ cancelled() }}
49+
run: |
50+
chainloop attestation reset --trigger cancellation
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
CL_VERSION: 0.8.16
54+
CHAINLOOP_ROBOT_ACCOUNT: ${{ secrets.CHAINLOOP_WF_RELEASE_DOCS }}
55+
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
56+
NETLIFY_SITE_ID: ${{ secrets.DOCS_NETLIFY_SITE_ID }}

.github/workflows/deploy-landing.yml

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Deploy Landing
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build_and_test:
10+
name: Deploy Landing
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Install Cosign
14+
uses: sigstore/[email protected]
15+
- name: Install ChainLoop
16+
run: |
17+
curl -sfL https://chainloop.dev/install.sh | bash -s -- --version v${{ env.CL_VERSION }}
18+
sudo install chainloop /usr/local/bin
19+
chainloop version
20+
- name: Write Cosign key
21+
run: echo "$COSIGN_KEY" > /tmp/cosign.key
22+
env:
23+
COSIGN_KEY: ${{ secrets.COSIGN_KEY }}
24+
- uses: actions/checkout@v3
25+
- name: Initialize Attestation
26+
run: |
27+
chainloop attestation init
28+
- uses: actions/setup-node@v3
29+
with:
30+
node-version: 16
31+
- name: npm install
32+
run: npm install
33+
- name: Build Landing
34+
run: netlify build
35+
- name: Deploy Landing
36+
run: netlify deploy --prod
37+
- name: Finish and Record Attestation
38+
if: ${{ success() }}
39+
run: |
40+
chainloop attestation push --key /tmp/cosign.key
41+
env:
42+
CHAINLOOP_SIGNING_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
43+
- name: Mark attestation as failed
44+
if: ${{ failure() }}
45+
run: |
46+
chainloop attestation reset
47+
- name: Mark attestation as cancelled
48+
if: ${{ cancelled() }}
49+
run: |
50+
chainloop attestation reset --trigger cancellation
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
CL_VERSION: 0.8.16
54+
CHAINLOOP_ROBOT_ACCOUNT: ${{ secrets.CHAINLOOP_WF_RELEASE_LANDING }}
55+
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
56+
NETLIFY_SITE_ID: ${{ secrets.LANDING_NETLIFY_SITE_ID }}

.github/workflows/test-docs.yml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Build and Test Docs
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
build_and_test:
8+
name: Build and Test
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Install Cosign
12+
uses: sigstore/[email protected]
13+
- name: Install ChainLoop
14+
run: |
15+
curl -sfL https://chainloop.dev/install.sh | bash -s -- --version v${{ env.CL_VERSION }}
16+
sudo install chainloop /usr/local/bin
17+
chainloop version
18+
- name: Write Cosign key
19+
run: echo "$COSIGN_KEY" > /tmp/cosign.key
20+
env:
21+
COSIGN_KEY: ${{ secrets.COSIGN_KEY }}
22+
- uses: actions/checkout@v3
23+
- name: Initialize Attestation
24+
run: |
25+
chainloop attestation init
26+
- uses: actions/setup-node@v3
27+
with:
28+
node-version: 16
29+
- name: npm install docs
30+
run: cd docs && npm install
31+
- name: Build Docs
32+
run: cd docs && netlify build
33+
env:
34+
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
35+
NETLIFY_SITE_ID: ${{ secrets.DOCS_NETLIFY_SITE_ID }}
36+
- name: Finish and Record Attestation
37+
if: ${{ success() }}
38+
run: |
39+
chainloop attestation push --key /tmp/cosign.key
40+
env:
41+
CHAINLOOP_SIGNING_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
42+
- name: Mark attestation as failed
43+
if: ${{ failure() }}
44+
run: |
45+
chainloop attestation reset
46+
- name: Mark attestation as cancelled
47+
if: ${{ cancelled() }}
48+
run: |
49+
chainloop attestation reset --trigger cancellation
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
CL_VERSION: 0.8.16
53+
CHAINLOOP_ROBOT_ACCOUNT: ${{ secrets.CHAINLOOP_WF_BUILD_AND_TEST_DOCS }}

.github/workflows/test-landing.yml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Build and Test Landing
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
build_and_test:
8+
name: Build and Test
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Install Cosign
12+
uses: sigstore/[email protected]
13+
- name: Install ChainLoop
14+
run: |
15+
curl -sfL https://chainloop.dev/install.sh | bash -s -- --version v${{ env.CL_VERSION }}
16+
sudo install chainloop /usr/local/bin
17+
chainloop version
18+
- name: Write Cosign key
19+
run: echo "$COSIGN_KEY" > /tmp/cosign.key
20+
env:
21+
COSIGN_KEY: ${{ secrets.COSIGN_KEY }}
22+
- uses: actions/checkout@v3
23+
- name: Initialize Attestation
24+
run: |
25+
chainloop attestation init
26+
- uses: actions/setup-node@v3
27+
with:
28+
node-version: 16
29+
- name: npm install
30+
run: npm install
31+
- name: Build Landing
32+
run: netlify build
33+
env:
34+
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
35+
NETLIFY_SITE_ID: ${{ secrets.LANDING_NETLIFY_SITE_ID }}
36+
- name: Finish and Record Attestation
37+
if: ${{ success() }}
38+
run: |
39+
chainloop attestation push --key /tmp/cosign.key
40+
env:
41+
CHAINLOOP_SIGNING_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
42+
- name: Mark attestation as failed
43+
if: ${{ failure() }}
44+
run: |
45+
chainloop attestation reset
46+
- name: Mark attestation as cancelled
47+
if: ${{ cancelled() }}
48+
run: |
49+
chainloop attestation reset --trigger cancellation
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
CL_VERSION: 0.8.16
53+
CHAINLOOP_ROBOT_ACCOUNT: ${{ secrets.CHAINLOOP_WF_BUILD_AND_TEST_LANDING }}

0 commit comments

Comments
 (0)