Skip to content

Commit 7d93f20

Browse files
chore(docs): add initial documentation with mkdocs (#3)
* docs(docs): add initial documentation with mkdos we add the first construct library docs * chore(docs): update pull request lint workflow we added the docs type of commit * fix(docs): the type of semantic pull request name the syntaxis was wrong because it didn't add the break line * chore(docs): revert pr lint validation we have the default PR Title Lint validation
1 parent 8eba479 commit 7d93f20

File tree

12 files changed

+197
-1
lines changed

12 files changed

+197
-1
lines changed

.cz-config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ module.exports = {
2424
{ value: 'WIP', name: 'WIP: Work in progress' },
2525
],
2626

27-
scopes: [{ name: 'codestarconnection' }, { name: 'projen' }],
27+
scopes: [
28+
{ name: 'codestarconnection' },
29+
{ name: 'projen' },
30+
{ name: 'docs' },
31+
],
2832

2933
usePreparedCommit: true, // to re-use commit from ./.git/COMMIT_EDITMSG
3034
allowTicketNumber: false,

.gitattributes

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/deploy-docs.yml

Lines changed: 27 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.gitignore

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v18.17.1

.prettierignore

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.projen/files.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.projen/tasks.json

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.projenrc.ts

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { awscdk } from 'projen';
2+
import { JobPermission } from 'projen/lib/github/workflows-model';
23
import { TrailingComma } from 'projen/lib/javascript';
4+
35
const project = new awscdk.AwsCdkConstructLibrary({
46
author: 'Antonio Márquez Pérez',
57
authorAddress: 'antonio.marquez@jumptothecloud.tech',
@@ -24,6 +26,7 @@ const project = new awscdk.AwsCdkConstructLibrary({
2426
verbose: true,
2527
},
2628
},
29+
github: true,
2730
deps: [] /* Runtime dependencies of this module. */,
2831
peerDeps: [] /* Peer dependencies of this module. */,
2932
description:
@@ -39,4 +42,59 @@ project.addScripts({
3942
commit: './node_modules/cz-customizable/standalone.js',
4043
});
4144

45+
project.addGitIgnore('site');
46+
47+
project.prettier?.addIgnorePattern('*.md');
48+
49+
project.addTask('docs:build', {
50+
exec: 'mkdocs build',
51+
});
52+
53+
project.addTask('docs:serve', {
54+
exec: 'mkdocs serve -a localhost:8099',
55+
});
56+
57+
const deployDocs = project.github?.addWorkflow('deploy-docs');
58+
deployDocs?.on({
59+
workflowDispatch: {},
60+
workflowRun: {
61+
workflows: ['release'],
62+
types: ['completed'],
63+
},
64+
});
65+
66+
deployDocs?.addJob('deploy-docs', {
67+
permissions: {
68+
contents: JobPermission.WRITE,
69+
},
70+
runsOn: ['ubuntu-latest'],
71+
steps: [
72+
{
73+
uses: 'actions/checkout@v4',
74+
},
75+
{
76+
uses: 'actions/setup-python@v4',
77+
with: {
78+
pythonVersion: '3.x',
79+
},
80+
},
81+
{
82+
run: 'echo "cache_id=$(date --utc "+%V")" >> $GITHUB_ENV',
83+
},
84+
{
85+
uses: 'actions/cache@v3',
86+
with: {
87+
key: 'mkdocs-material-${{ env.cache_id }}',
88+
path: '.cache',
89+
},
90+
},
91+
{
92+
run: 'pip install mkdocs-material',
93+
},
94+
{
95+
run: 'mkdocs gh-deploy --force',
96+
},
97+
],
98+
});
99+
42100
project.synth();

docs/index.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Homepage
2+
3+
This is a AWS CDK Construct Library to create a Code Star Connection.
4+
5+
## Install
6+
7+
You can install this library using the following command
8+
9+
```shell
10+
yarn add @jttc/aws-codestarconnection
11+
```
12+
13+
```shell
14+
npm install @jttc/aws-codestarconnection
15+
```
16+
17+
## Features
18+
19+
The Construct Library has the following L2 Construct:
20+
21+
| Construct | Description |
22+
|-------------------------|----------------------------------------------------------------|
23+
| [CodeStarConnection](#) | We create a Code Star Connection for every Provider available |

0 commit comments

Comments
 (0)