Skip to content

Commit

Permalink
chore(docs): octo docs website deployed.
Browse files Browse the repository at this point in the history
  • Loading branch information
rash805115 committed Apr 7, 2024
1 parent 3930418 commit bba42ab
Show file tree
Hide file tree
Showing 10 changed files with 6,508 additions and 3,229 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# Octo
http://octo.quadnix.com/

The open-source infrastructure management and CICD tool.

> Disclaimer,
> This library is currently in development.
> We will post a new release when it is ready for production.
> This library is still under development and is currently in version `0.x.x`.
> We plan to release version `1.x.x` when it is deemed ready for production use.

# Local Setup
> npm install
Expand Down
31 changes: 31 additions & 0 deletions apps/octo-docs/deployment/deploy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
(async () => {
const { App, LocalStateProvider } = await import('@quadnix/octo');
const { OctoAws, RegionId, S3StaticWebsiteService } = await import('@quadnix/octo-aws-cdk');
const { join } = await import('path');

const BUCKET_NAME = 'octo.quadnix.com';
const websiteSourcePath = join(__dirname, '..', 'build');

const octoAws = new OctoAws();
await octoAws.initialize(new LocalStateProvider(__dirname));

// Add website.
const app = new App('octo-docs');
const service = new S3StaticWebsiteService(RegionId.AWS_US_EAST_1A, BUCKET_NAME);
app.addService(service);

const diffs1 = await octoAws.diff(app);
const generator1 = await octoAws.beginTransaction(diffs1);

const modelTransactionResult1 = await generator1.next();
await octoAws.commitTransaction(app, modelTransactionResult1.value);

// Add files to website.
await service.addSource(`${websiteSourcePath}`);

const diffs2 = await octoAws.diff(app);
const generator2 = await octoAws.beginTransaction(diffs2);

const modelTransactionResult2 = await generator2.next();
await octoAws.commitTransaction(app, modelTransactionResult2.value);
})();
1 change: 1 addition & 0 deletions apps/octo-docs/deployment/models.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"anchors":[],"dependencies":[{"behaviors":[{"forAction":"delete","onAction":"delete","onField":"name","toField":"serviceId"}],"from":"app=octo-docs","relationship":{"onField":"name","toField":"serviceId","type":"parent"},"to":"service=octo.quadnix.com-s3-static-website,app=octo-docs"},{"behaviors":[{"forAction":"add","onAction":"add","onField":"serviceId","toField":"name"},{"forAction":"update","onAction":"add","onField":"serviceId","toField":"name"}],"from":"service=octo.quadnix.com-s3-static-website,app=octo-docs","relationship":{"onField":"serviceId","toField":"name","type":"child"},"to":"app=octo-docs"}],"models":{"app=octo-docs":{"className":"App","model":{"name":"octo-docs"}},"service=octo.quadnix.com-s3-static-website,app=octo-docs":{"className":"S3StaticWebsiteService","model":{"awsRegionId":"us-east-1","bucketName":"octo.quadnix.com","excludePaths":[],"serviceId":"octo.quadnix.com-s3-static-website","sourcePaths":[{"directoryPath":"/Users/rash/Workspace/@quadnix/octo/apps/octo-docs/build","isDirectory":true,"remotePath":"","subDirectoryOrFilePath":""}]}}},"modules":[],"overlays":[],"version":"0.0.1"}
1 change: 1 addition & 0 deletions apps/octo-docs/deployment/octo.quadnix.com-manifest.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions apps/octo-docs/deployment/resources.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"dependencies":[],"resources":{"bucket-octo.quadnix.com":{"className":"S3Website","resource":{"properties":{"awsRegionId":"us-east-1","Bucket":"octo.quadnix.com","ErrorDocument":"error.html","IndexDocument":"index.html"},"resourceId":"bucket-octo.quadnix.com","response":{"awsRegionId":"us-east-1"}}}},"version":"0.0.1"}
1 change: 1 addition & 0 deletions apps/octo-docs/deployment/shared-resources.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"sharedResources":{},"version":"0.0.1"}
9,393 changes: 6,268 additions & 3,125 deletions apps/octo-docs/package-lock.json

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion apps/octo-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
"devDependencies": {
"@docusaurus/module-type-aliases": "3.2.0",
"@docusaurus/tsconfig": "3.2.0",
"@docusaurus/types": "3.2.0"
"@docusaurus/types": "3.2.0",
"@quadnix/octo": "~0.0.17",
"@quadnix/octo-aws-cdk": "~0.0.6"
},
"engines": {
"node": ">=18.0"
Expand All @@ -42,6 +44,7 @@
"scripts": {
"build": "docusaurus build",
"clear": "docusaurus clear",
"deploy": "node deployment/deploy.js",
"docusaurus": "docusaurus",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"lint": "eslint .",
Expand Down
Loading

0 comments on commit bba42ab

Please sign in to comment.