-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (46 loc) · 1.25 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
on:
push:
branches:
- main
pull_request:
branches:
- main
repository_dispatch:
types: [publish_notes]
jobs:
publish:
runs-on: ubuntu-latest
name: build org files and publish
steps:
- uses: purcell/setup-emacs@master
with:
version: 27.2
- uses: actions/checkout@v3
name: website_repo
with:
path: website
- uses: actions/checkout@v3
name: notes_org_files
with:
repository: siddhantk232/vimwiki
ref: main
token: ${{ secrets.GH_PAT }}
path: org_files
sparse-checkout: |
studies
- name: compile org files
run: |
pushd website
emacs -Q --script org_publish_notes.el
emacs -Q --script org_publish_posts.el
popd
- name: Create website.zip and upload to netlify
run: |
pushd website/site
mv notes/theindex.html notes/index.html
zip -r website.zip .
curl -H "Content-Type: application/zip" \
-H "Authorization: Bearer ${{ secrets.netlify_token }}" \
--data-binary "@website.zip" \
https://api.netlify.com/api/v1/sites/siddhantcodes.netlify.app/deploys
popd