Skip to content

fix: search

fix: search #118

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Lint
uses: DavidAnson/markdownlint-cli2-action@v11
with:
globs: '**/*.md'
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Install dependencies
run: npm ci
- name: Make light and dark variants
run: |
cp src/pages/index.tsx src/pages/light.js
cp src/pages/index.tsx src/pages/dark.js
cd docs
sed '2 s/creating-bundles/creating-bundles-light/' creating-bundles.md > creating-bundles-light.md
sed '2 s/creating-bundles/creating-bundles-dark/' creating-bundles.md > creating-bundles-dark.md
- name: Build
run: npm run build
- name: Theme fixup
run: |
cd build
mv light/index.html light.html
mv dark/index.html dark.html
rmdir light
rmdir dark
# - name: Lighthouse CI
# run: |
# export LHCI_BUILD_CONTEXT__CURRENT_BRANCH=${GITHUB_REF##*/}
# export LHCI_BUILD_CONTEXT__GITHUB_REPO_SLUG=${GITHUB_REPOSITORY}
# npx @lhci/cli@^0.3.0 autorun
# env:
# LHCI_GITHUB_TOKEN: ${{ github.token }}
- name: Deploy
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
touch build/.nojekyll
echo "www.nodecg.dev" > build/CNAME
npx gh-pages@3 \
--dotfiles \
--dist build \
--repo https://${{ github.actor }}:${{ github.token }}@github.com/${{ github.repository }}.git \
--user "GitHub Action <[email protected]>"