Merge pull request #326 from seasalt-ai/amychen/seachat-1016 #293
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: github pages | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
# Check out the repository | |
- uses: actions/checkout@v2 | |
# Setup Hugo | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: '0.92.2' | |
extended: true | |
# Setup Node.js | |
- name: Setup Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '20.11.0' | |
# Install dependencies | |
- name: Install dependencies | |
run: npm ci | |
# Clean previous builds | |
- name: Clean previous builds | |
run: npm run clean && npm run clean:pagefind | |
# Build the Hugo site for development | |
- name: Build Hugo site | |
run: npm run build:hugo | |
# Generate Pagefind index | |
- name: Generate Pagefind index | |
run: npm run index:pagefind | |
# Copy Pagefind files to static folder | |
- name: Copy Pagefind files to static | |
run: npm run copy:pagefind-generated | |
# Build the Hugo site for development | |
- name: Build Hugo site for dev | |
run: npm run build:dev | |
# Deploy to GitHub Pages | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
if: github.ref == 'refs/heads/main' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./public | |
cname: wiki.seasalt.ai |