Skip to content

Commit

Permalink
Merge pull request #15 from nqminds/hedgedoc-implementation
Browse files Browse the repository at this point in the history
implement hedgedoc && docusaurus
  • Loading branch information
anthonymccaigue authored Jan 8, 2024
2 parents 1b82d55 + 8ed8369 commit ad97146
Show file tree
Hide file tree
Showing 42 changed files with 19,377 additions and 718 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Node.js CI and Deploy

on:
push:
branches:
- main


jobs:
build-and-deploy:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20]

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies in root
run: npm install

- name: Install dependencies in /packages/docusaurus
run: |
cd packages/docusaurus
npm install
- name: Build in /packages/docusaurus
run: |
cd packages/docusaurus
npm run build
- name: Deploy to Remote Server
run: |
mkdir -p $HOME/.ssh
echo "${{ secrets.DEPLOY_KEY }}" > $HOME/.ssh/deploy_key
chmod 600 $HOME/.ssh/deploy_key
rsync -avz --exclude='.git' -e "ssh -o StrictHostKeyChecking=no -i $HOME/.ssh/deploy_key -p ${{ secrets.REMOTE_SERVER_PORT }}" packages/docusaurus/build/ ${{ secrets.REMOTE_SERVER_USERNAME }}@${{ secrets.REMOTE_SERVER_HOST }}:/var/www/${{ secrets.REMOTE_SERVER_FOLDER }}/
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
10 changes: 10 additions & 0 deletions config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

{
"TITLE": "NIST-Trusted-Onboarding",
"TAGLINE": "Build-5",
"DOCUSAURUS_URL": "http://office.nqm.ai",
"PROJECT_NAME": "@nqminds/nist-brski",
"HEDGEDOC_SERVER": "http://hedgedoc.nqminds.com:3001",
"GITHUB_OWNER": "nqminds",
"GITHUB_REPO": "nist-brski"
}
18,010 changes: 17,293 additions & 717 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"npm": ">=8.7.0"
},
"workspaces": [
"./node-packages/*"
"./node-packages/*",
"./packages/*"
],
"keywords": [
"nist",
Expand Down
26 changes: 26 additions & 0 deletions packages/docusaurus/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

/pdf

# Ignore auto generated schemas
/docs/schemas/*
!/docs/schemas/1-schemas.md
41 changes: 41 additions & 0 deletions packages/docusaurus/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Website

This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.

### Installation

```
$ yarn
```

### Local Development

```
$ yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
$ yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment

Using SSH:

```
$ USE_SSH=true yarn deploy
```

Not using SSH:

```
$ GIT_USER=<Your GitHub username> yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
3 changes: 3 additions & 0 deletions packages/docusaurus/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
Loading

0 comments on commit ad97146

Please sign in to comment.