Publish workflow: Autoformatting
This commit is contained in:
parent
1c8514fa79
commit
701f61f683
|
@ -9,66 +9,66 @@ jobs:
|
|||
runs-on: ubuntu-20.04 # change to -latest when possible
|
||||
|
||||
steps:
|
||||
- uses: purcell/setup-emacs@master
|
||||
with:
|
||||
version: 27.1
|
||||
- uses: purcell/setup-emacs@master
|
||||
with:
|
||||
version: 27.1
|
||||
|
||||
- name: Checkout config
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Checkout config
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Symlink config to expected location
|
||||
# I could just set DOOMDIR ... but this is also easy
|
||||
run: |
|
||||
mkdir -p ~/.config
|
||||
ln -s $GITHUB_WORKSPACE ~/.config/doom
|
||||
mkdir -p ~/.org/roam
|
||||
- name: Symlink config to expected location
|
||||
# I could just set DOOMDIR ... but this is also easy
|
||||
run: |
|
||||
mkdir -p ~/.config
|
||||
ln -s $GITHUB_WORKSPACE ~/.config/doom
|
||||
mkdir -p ~/.org/roam
|
||||
|
||||
- name: Generate init.el et. al from config.org
|
||||
run: |
|
||||
cd ~/.config/doom
|
||||
emacs --batch --eval "(require 'org)" --eval '(org-babel-tangle-file "config.org")'
|
||||
- name: Generate init.el et. al from config.org
|
||||
run: |
|
||||
cd ~/.config/doom
|
||||
emacs --batch --eval "(require 'org)" --eval '(org-babel-tangle-file "config.org")'
|
||||
|
||||
- name: Clone Doom to ~/.emacs.d
|
||||
run: git clone --depth 1 https://github.com/hlissner/doom-emacs ~/.emacs.d
|
||||
- name: Clone Doom to ~/.emacs.d
|
||||
run: git clone --depth 1 https://github.com/hlissner/doom-emacs ~/.emacs.d
|
||||
|
||||
- name: Get Doom's version
|
||||
id: doom-version
|
||||
run: |
|
||||
cd ~/.emacs.d
|
||||
echo ::set-output name=hash::$(git log -1 | head -1 | awk '{print substr($2,1,7)}')
|
||||
shell: bash
|
||||
- name: Get Doom's version
|
||||
id: doom-version
|
||||
run: |
|
||||
cd ~/.emacs.d
|
||||
echo ::set-output name=hash::$(git log -1 | head -1 | awk '{print substr($2,1,7)}')
|
||||
shell: bash
|
||||
|
||||
- name: Cache Doom's install
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.emacs.d
|
||||
key: ${{ runner.os }}-doom@${{ steps.doom-version.outputs.hash }}
|
||||
- name: Cache Doom's install
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.emacs.d
|
||||
key: ${{ runner.os }}-doom@${{ steps.doom-version.outputs.hash }}
|
||||
|
||||
- name: Doom dependencies
|
||||
run: sudo apt-get install git ripgrep xclip
|
||||
- name: Doom dependencies
|
||||
run: sudo apt-get install git ripgrep xclip
|
||||
|
||||
- name: Install Doom
|
||||
run: ~/.emacs.d/bin/doom install --no-env --no-fonts
|
||||
- name: Install Doom
|
||||
run: ~/.emacs.d/bin/doom install --no-env --no-fonts
|
||||
|
||||
- name: Export config
|
||||
run: |
|
||||
cd ~/.config/doom/misc
|
||||
./config-publishing/publish.sh
|
||||
cp ../config.html ../index.html
|
||||
- name: Export config
|
||||
run: |
|
||||
cd ~/.config/doom/misc
|
||||
./config-publishing/publish.sh
|
||||
cp ../config.html ../index.html
|
||||
|
||||
- name: Move files of interest to the publish subdir
|
||||
run: |
|
||||
cd ~/.config/doom
|
||||
mkdir ./publish
|
||||
mv *.html ./publish
|
||||
mkdir ./publish/misc
|
||||
mv ./misc/*.svg ./publish/misc/
|
||||
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
|
||||
publish_dir: ./publish
|
||||
force_orphan: true
|
||||
- name: Move files of interest to the publish subdir
|
||||
run: |
|
||||
cd ~/.config/doom
|
||||
mkdir ./publish
|
||||
mv *.html ./publish
|
||||
mkdir ./publish/misc
|
||||
mv ./misc/*.svg ./publish/misc/
|
||||
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
|
||||
publish_dir: ./publish
|
||||
force_orphan: true
|
||||
|
|
Loading…
Reference in New Issue