Skip to content

upgrade upload-pages-artifact action to v3 #137

upgrade upload-pages-artifact action to v3

upgrade upload-pages-artifact action to v3 #137

name: Upload Data to Algolia Index
on:
push:
branches:
- master
jobs:
upload_data:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.110.0
steps:
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Git Checkout
uses: actions/checkout@v4
with:
submodules: true # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Build Site
run: hugo
- name: Upload Data
working-directory: ./algolia
run: |
npm install
npm run data-upload -- -c \
-f ../public/index.json \
-a 810O6T2B5U \
-k ${{ secrets.ALGOLIA_ADMIN_API_KEY }} \
-n prod_bilberry_sandbox