Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Netlify deploy #1318

Merged
merged 10 commits into from
Feb 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .markdownlintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docs/4-user-guide/1-the-zarf-cli/100-cli-commands/
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
[![Zarf Website](https://img.shields.io/badge/web-zarf.dev-6d87c3)](https://zarf.dev/)
[![Zarf Documentation](https://img.shields.io/badge/docs-docs.zarf.dev-775ba1)](https://docs.zarf.dev/)
[![Go version](https://img.shields.io/github/go-mod/go-version/defenseunicorns/zarf?filename=go.mod)](https://go.dev/)
[![Build Status](https://img.shields.io/github/actions/workflow/status/defenseunicorns/zarf/release.yml)](https://github.com/defenseunicorns/zarf/actions/workflows/release.yml)

||Build Status|
|---|---|
|Zarf|[![Build Status](https://img.shields.io/github/actions/workflow/status/defenseunicorns/zarf/release.yml)](https://github.com/defenseunicorns/zarf/actions/workflows/release.yml)|
|Zarf Documentation|[![Zarf Documentation Status](https://api.netlify.com/api/v1/badges/fe846ae4-25fb-4274-9968-90782640ee9f/deploy-status)](https://app.netlify.com/sites/zarf-docs/deploys)|

<img align="right" alt="zarf logo" src=".images/zarf-logo.png" height="256" />

Expand Down
52 changes: 14 additions & 38 deletions docs-website/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
[![Zarf Slack Channel](https://img.shields.io/badge/k8s%20slack-zarf-40a3dd)](https://kubernetes.slack.com/archives/C03B6BJAUJ3)
[![Zarf Website](https://img.shields.io/badge/web-zarf.dev-6d87c3)](https://zarf.dev/)
[![Zarf Documentation](https://img.shields.io/badge/docs-docs.zarf.dev-775ba1)](https://docs.zarf.dev/)
Zarf Documentation|[![Zarf Documentation Status](https://api.netlify.com/api/v1/badges/fe846ae4-25fb-4274-9968-90782640ee9f/deploy-status)](https://app.netlify.com/sites/zarf-docs/deploys)

This is the docs site for [Zarf](https://github.com/defenseunicorns/zarf), a declarative air gap solution for Kubernetes. This site is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator created by Facebook.

### Prerequisites
## Prerequisites

This site requires `nodejs` and `npm` so install it if you haven't already.

``` shell
```bash
# FOR LINUX (Ubuntu)
$ sudo apt update
$ sudo apt install nodejs
Expand All @@ -20,45 +21,20 @@ $ sudo apt install npm
$ brew install nodejs
```

### Installation
## Installation

To install required dependencies run the following:
To install the required dependencies run the following:

``` shell
$ npm ci
```bash
npm ci
```

### Updating Zarf `docs` Files

The markdown files for Zarf are held in the main Zarf repo and are pulled into this repo using a submodule. The current versions will be cloned as part of the `postinstall` script. To update the reference to those docs run the following command:

``` shell
$ git submodule update --remote --recursive main
```

To checkout a specific tag within the submodule you can do the following after updating:

``` shell
$ cd main
$ git checkout <tag>
$ cd ..
```

You may also find it useful to switch to a different branch for the submodule. You can do this by adding a `branch` to `.gitmodules`:

```
[submodule "main"]
path = main
url = https://github.com/defenseunicorns/zarf.git
branch = <your-branch-here>
```

### Running
## Running

There are two ways to run the site locally, the simplest being the following:

``` shell
$ npm run start
```bash
npm run start
```

This will open a browser window that will let you see the built site.
Expand All @@ -67,11 +43,11 @@ This will open a browser window that will let you see the built site.
To perform a full build and to run it locally you should run the following:

``` shell
$ npm run build
$ npm run serve
```bash
npm run build
npm run serve
```

### Deployment
## Deployment

To deploy the site, push your changes into a branch and open a PR. [Netlify](https://www.netlify.com/) will generate a preview for you and a PR approver to see your changes. Once the approver is happy with the changes they can approve and merge the PR and it will be pushed to production.
7 changes: 7 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[build]
base = "docs-website/"
command = "npm run build"
publish = "build/"

[build.environment]
NODE_VERSION = "18.12.1"