mirror of
https://github.com/dongdigua/dongdigua.github.io
synced 2024-11-30 23:30:53 +08:00
test CI
This commit is contained in:
parent
ad0b83ad7f
commit
8d88bf19e7
62
.github/workflows/site.yml
vendored
Normal file
62
.github/workflows/site.yml
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
name: Deploy with Org and Jekyll
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
|
||||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
concurrency:
|
||||
group: "pages"
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install Emacs
|
||||
uses: purcell/setup-emacs@master
|
||||
with:
|
||||
version: 28.1
|
||||
|
||||
- name: Build with Org
|
||||
run: |
|
||||
cd org
|
||||
make clean
|
||||
make
|
||||
tree ../
|
||||
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v2
|
||||
|
||||
- name: Build with Jekyll
|
||||
uses: actions/jekyll-build-pages@v1
|
||||
with:
|
||||
source: ./
|
||||
destination: ./_site
|
||||
|
||||
- name: Patch HTML
|
||||
run: |
|
||||
tree _site
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v1
|
||||
|
||||
deploy:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v1
|
||||
|
@ -12,5 +12,5 @@ html:
|
||||
|
||||
clean:
|
||||
- rm ~/.org-timestamps/org-pages.cache
|
||||
$(TARGET) | xargs -I {} rm {}
|
||||
rm ../feed.xml*
|
||||
- $(TARGET) | xargs -I {} rm {}
|
||||
- rm ../feed.xml*
|
||||
|
@ -4,10 +4,16 @@
|
||||
|
||||
;; System Crafter's video: https://youtu.be/AfkrzFodoNw
|
||||
|
||||
(eval-when-compile
|
||||
(require 'package)
|
||||
(package-initialize)
|
||||
(require 'package)
|
||||
(package-initialize)
|
||||
;; https://liujiacai.net/blog/2021/05/05/emacs-package
|
||||
(when (not package-archive-contents)
|
||||
(package-refresh-contents))
|
||||
(dolist (p '(webfeeder))
|
||||
(when (not (package-installed-p p))
|
||||
(package-install p)))
|
||||
|
||||
(eval-when-compile
|
||||
(require 'org)
|
||||
(require 'ox)
|
||||
(require 'webfeeder))
|
||||
|
Loading…
Reference in New Issue
Block a user