Skip to content

Commit

Permalink
docs: testing workflow for website, remove dependency (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
usefulthink authored Oct 27, 2023
1 parent e108d2e commit 3fba28f
Show file tree
Hide file tree
Showing 4 changed files with 356 additions and 273 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/test-website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Website Test
on: [push, pull_request]

jobs:
build:
name: Build Website
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: '20'
cache: npm
cache-dependency-path: ./website/package-lock.json

- name: Install dependencies
working-directory: ./website
run: npm ci

- name: Build website
working-directory: ./website
run: |
npm run build
env:
GOOGLE_MAPS_API_KEY: ${{ secrets.GOOGLE_MAPS_API_KEY }}
11 changes: 9 additions & 2 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion

const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
let lightCodeTheme = null;
let darkCodeTheme = null;

try {
// prism-react-renderer is a dependency of @docusaurus/theme-common
lightCodeTheme = require('prism-react-renderer/themes/github');
darkCodeTheme = require('prism-react-renderer/themes/dracula');
} catch (err) {}

// const webpack = require('webpack');
const {resolve} = require('path');
const webpack = require('webpack');
Expand Down
Loading

0 comments on commit 3fba28f

Please sign in to comment.