-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (48 loc) · 1.37 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
44
45
46
47
48
49
50
51
52
53
54
55
name: Deploy Hugo from Obsidian notes
on:
push:
branches:
- main
- build-test
jobs:
publish_job:
runs-on: ubuntu-latest
name: Publish Obsidian notes to Github pages
steps:
- name: Checkout contents repo
uses: actions/checkout@v4
with:
token: ${{ secrets.DWARVES_PAT }}
submodules: recursive
fetch-depth: 5
- name: Install devbox
uses: jetpack-io/devbox-install-action@v0.11.0
with:
enable-cache: true
devbox-version: 0.13.3
- name: Run Build
run: devbox run build
env:
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
ALGOLIA_APPLICATION_ID: ${{ secrets.ALGOLIA_APPLICATION_ID }}
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
notify_job:
runs-on: ubuntu-latest
name: Notify Discord
needs: publish_job
steps:
- name: Sleep for 30 seconds
uses: jakejarvis/wait-action@master
with:
time: '30s'
- name: Discord notification
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: Ilshidur/action-discord@master
with:
args: 'memo.d.foundation has been updated.'