Skip to content
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
26 changes: 12 additions & 14 deletions .github/workflows/build_and_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,33 @@ on:
- v*
pull_request:

permissions:
contents: write

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: recursive # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
fetch-depth: 0

- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
- uses: actions/setup-node@v4
with:
hugo-version: "0.123.8"
extended: true
node-version: 20

- name: Install requirements
- name: Install dependencies
working-directory: spiceaidocs
run: |
npm install
cd themes/docsy && npm install
run: npm install

- name: Build
- name: Build website
working-directory: spiceaidocs
run: hugo --minify
run: npm run build

- name: Deploy
if: ${{ github.event_name != 'pull_request' && startswith(github.ref, 'refs/tags/v') }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./spiceaidocs/public
publish_dir: ./spiceaidocs/build
cname: docs.spiceai.org
19 changes: 6 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ This repo contains the markdown files which generate the above website. See belo

## Overview

The Spice.ai docs are built using [Hugo](https://gohugo.io/) with the [Docsy](https://docsy.dev) theme, hosted on [GitHub Pages](https://pages.github.com/).
The Spice.ai docs are built using [Docusaurus](https://docusaurus.io/) hosted on [GitHub Pages](https://pages.github.com/).

The [spiceaidocs](./spiceaidocs) directory contains the hugo project, markdown files, and theme configurations.
The [spiceaidocs](./spiceaidocs) directory contains the Docusaurus project, markdown files, and theme configurations.

## Pre-requisites

- [Hugo extended version](https://gohugo.io/getting-started/installing)
- [Node.js](https://nodejs.org/en/)
- [Docusaurus](https://docusaurus.io/docs/installation)

## Environment setup

Expand All @@ -32,17 +32,10 @@ git clone https://github.com/spiceai/docs.git
cd ./docs/spiceaidocs
```

4. Update submodules:

```sh
git submodule update --init --recursive
```

5. Install npm packages:
4. Install npm packages:

```sh
npm install
cd themes/docsy && npm install
```

## Run local server
Expand All @@ -51,10 +44,10 @@ cd themes/docsy && npm install
2. Run

```sh
hugo server
npm start
```

3. Navigate to `http://localhost:1313/`
3. Navigate to `http://localhost:3000/`

## Update docs

Expand Down
20 changes: 20 additions & 0 deletions spiceaidocs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 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*
25 changes: 25 additions & 0 deletions spiceaidocs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Website

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

### Installation

```
$ npm install
```

### Local Development

```
$ npm 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

```
$ npm run build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.
6 changes: 0 additions & 6 deletions spiceaidocs/archetypes/default.md

This file was deleted.

37 changes: 0 additions & 37 deletions spiceaidocs/assets/scss/_styles_project.scss

This file was deleted.

4 changes: 0 additions & 4 deletions spiceaidocs/assets/scss/_variables_project.scss

This file was deleted.

3 changes: 3 additions & 0 deletions spiceaidocs/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')],
};
141 changes: 0 additions & 141 deletions spiceaidocs/config.toml

This file was deleted.

Loading