Skip to content

Commit

Permalink
CI: use makefile to imporve workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
dongdigua committed Mar 30, 2024
1 parent a859c52 commit a41eb01
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 23 deletions.
25 changes: 5 additions & 20 deletions .github/workflows/site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,15 @@ jobs:
- name: Install Emacs
uses: purcell/setup-emacs@master
with:
version: 28.2
version: 29.3

- name: Prepare
- name: make
run: |
curl "https://raw.githubusercontent.com/dongdigua/configs/main/.tmux.conf" -o misc/tmux.conf
- name: Build with Org
run: |
make describe
cd org
make clean
sudo apt -q install pandoc
make
cd ..
curl "https://raw.githubusercontent.com/dongdigua/configs/main/.tmux.conf" -o misc/tmux.conf
./patches/txt.sh
./patches/color.sh
- name: Setup Pages
uses: actions/configure-pages@v2
Expand All @@ -51,16 +46,6 @@ jobs:
source: ./
destination: ./_site

- name: Post-Jekyll Build
run: |
tree
cd _site
sudo ./patches/color.sh
sudo apt install pandoc
# use jekyll to check link but actually use pandoc
sudo pandoc posts.md --css=css/everforest.css -s -o posts.html
- name: Upload artifact
uses: actions/upload-pages-artifact@v1

Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
all: org posts gmi
all: describe org posts gmi

.PHONY: org
org:
cd org && make
cd org; $(MAKE)
pwd

posts:
pandoc posts.md --css=css/everforest.css -s -o posts.html
Expand All @@ -10,7 +12,6 @@ gmi:
misc/mdlist2gmi.py > posts.gmi

describe:
git describe --tags HEAD
sed -i "s/\$$v\\$$/\$$v: $$(git describe --tags HEAD)\\$$/g" index.html

clean:
Expand Down

0 comments on commit a41eb01

Please sign in to comment.