Skip to content

Build site

Build site #1363

Workflow file for this run

name: Build site
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check-out the repository
uses: actions/checkout@v2
- name: Install the npm dependencies
uses: bahmutov/npm-install@v1
- name: Set environment variables
run: echo "AUTHOR_API_TOKEN"=${{ secrets.AUTHOR_API_TOKEN }} >> $GITHUB_ENV
- name: Re-generate the SEE-ALSO data
run: npm run generate-see-also
- name: Commit the new SEE-ALSO data
run: |
git config --local user.email "${{ github.actor }}@users.noreply.github.com"
git config --local user.name "${{ github.actor }}"
git add .
git commit -m "Regenerate see-also data" --allow-empty
git push origin main
- name: Run the eleventy build script
run: npm run build
- name: Re-generate the PAGEFIND data
run: npm run generate-pagefind
- name: Deploy the site to the gh-pages branch
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: ./dist
github_token: ${{ secrets.GITHUB_TOKEN }}