-
Notifications
You must be signed in to change notification settings - Fork 35
43 lines (33 loc) · 1.15 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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 }}