Skip to content

Commit

Permalink
single CI
Browse files Browse the repository at this point in the history
notes have to be built even when only posts changes because we are
overwriting netlify upstream
  • Loading branch information
siddhantk232 committed Jul 27, 2023
1 parent 4c76395 commit bd3fc66
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 44 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@ on:
pull_request:
branches:
- main
repository_dispatch:
types: [publish_notes]

jobs:
publish:
runs-on: ubuntu-latest
name: build posts org files and publish
name: build org files and publish

steps:
- uses: purcell/setup-emacs@master
with:
Expand All @@ -18,19 +21,28 @@ jobs:
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 ;; TODO: merge existing posts/index.html
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
41 changes: 0 additions & 41 deletions .github/workflows/notes.yml

This file was deleted.

0 comments on commit bd3fc66

Please sign in to comment.