mirror of
https://github.com/dongdigua/dongdigua.github.io
synced 2024-11-27 08:40:53 +08:00
CI: use makefile to imporve workflow
don't forget PHONY
This commit is contained in:
parent
a859c52e9a
commit
101b65a1a8
11
.github/dependbot.yml
vendored
Normal file
11
.github/dependbot.yml
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# To get started with Dependabot version updates, you'll need to specify which
|
||||||
|
# package ecosystems to update and where the package manifests are located.
|
||||||
|
# Please see the documentation for all configuration options:
|
||||||
|
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
|
||||||
|
|
||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: "" # See documentation for possible values
|
||||||
|
directory: "/" # Location of package manifests
|
||||||
|
schedule:
|
||||||
|
interval: "monthly"
|
33
.github/workflows/site.yml
vendored
33
.github/workflows/site.yml
vendored
@ -19,7 +19,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 30
|
fetch-depth: 30
|
||||||
fetch-tags: true
|
fetch-tags: true
|
||||||
@ -27,23 +27,18 @@ jobs:
|
|||||||
- name: Install Emacs
|
- name: Install Emacs
|
||||||
uses: purcell/setup-emacs@master
|
uses: purcell/setup-emacs@master
|
||||||
with:
|
with:
|
||||||
version: 28.2
|
version: 29.3
|
||||||
|
|
||||||
- name: Prepare
|
- name: make
|
||||||
run: |
|
run: |
|
||||||
curl "https://raw.githubusercontent.com/dongdigua/configs/main/.tmux.conf" -o misc/tmux.conf
|
sudo apt-get -q install pandoc
|
||||||
|
|
||||||
- name: Build with Org
|
|
||||||
run: |
|
|
||||||
make describe
|
|
||||||
cd org
|
|
||||||
make clean
|
|
||||||
make
|
make
|
||||||
cd ..
|
curl "https://raw.githubusercontent.com/dongdigua/configs/main/.tmux.conf" -o misc/tmux.conf
|
||||||
./patches/txt.sh
|
./patches/txt.sh
|
||||||
|
./patches/color.sh
|
||||||
|
|
||||||
- name: Setup Pages
|
- name: Setup Pages
|
||||||
uses: actions/configure-pages@v2
|
uses: actions/configure-pages@v5
|
||||||
|
|
||||||
- name: Build with Jekyll
|
- name: Build with Jekyll
|
||||||
uses: actions/jekyll-build-pages@v1
|
uses: actions/jekyll-build-pages@v1
|
||||||
@ -51,18 +46,8 @@ jobs:
|
|||||||
source: ./
|
source: ./
|
||||||
destination: ./_site
|
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
|
- name: Upload artifact
|
||||||
uses: actions/upload-pages-artifact@v1
|
uses: actions/upload-pages-artifact@v3
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
environment:
|
environment:
|
||||||
@ -73,5 +58,5 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Deploy to GitHub Pages
|
- name: Deploy to GitHub Pages
|
||||||
id: deployment
|
id: deployment
|
||||||
uses: actions/deploy-pages@v1
|
uses: actions/deploy-pages@v4
|
||||||
|
|
||||||
|
6
Makefile
6
Makefile
@ -1,7 +1,8 @@
|
|||||||
all: org posts gmi
|
all: describe org posts gmi
|
||||||
|
|
||||||
|
.PHONY: org
|
||||||
org:
|
org:
|
||||||
cd org && make
|
cd org; $(MAKE)
|
||||||
|
|
||||||
posts:
|
posts:
|
||||||
pandoc posts.md --css=css/everforest.css -s -o posts.html
|
pandoc posts.md --css=css/everforest.css -s -o posts.html
|
||||||
@ -10,7 +11,6 @@ gmi:
|
|||||||
misc/mdlist2gmi.py > posts.gmi
|
misc/mdlist2gmi.py > posts.gmi
|
||||||
|
|
||||||
describe:
|
describe:
|
||||||
git describe --tags HEAD
|
|
||||||
sed -i "s/\$$v\\$$/\$$v: $$(git describe --tags HEAD)\\$$/g" index.html
|
sed -i "s/\$$v\\$$/\$$v: $$(git describe --tags HEAD)\\$$/g" index.html
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
Loading…
Reference in New Issue
Block a user