remove temp_md and temp_blog vars to improve clarity

This commit is contained in:
Matthew Wong 2022-12-11 15:02:09 -05:00
parent ad18a8fa58
commit 72f72e41a6
1 changed files with 7 additions and 9 deletions

View File

@ -2,8 +2,6 @@ name: Publish Markdown Files
env:
BLOG_REPO: matthewwong525/linked-blog-starter
PUBLISH_DIR: publish
MD_DIR: temp_md
BLOG_DIR: temp_blog
on:
push:
branches: [main]
@ -14,11 +12,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
with:
path: ${{ env.MD_DIR }}
path: temp_md
- name: Checkout linked blog starter repo
uses: actions/checkout@v3
with:
path: ${{ env.BLOG_DIR }}
path: temp_blog
repository: ${{ env.BLOG_REPO }}
- name: Install Rust / cargo
uses: actions-rs/toolchain@v1
@ -27,13 +25,13 @@ jobs:
- name: Install and run obsidian-export
run: |
cargo install obsidian-export
rm -rf ${{ env.BLOG_DIR }}/common_md && mkdir ${{ env.BLOG_DIR }}/common_md
~/.cargo/bin/obsidian-export ./${{ env.MD_DIR }}/${{ env.PUBLISH_DIR }} ${{ env.BLOG_DIR }}/common_md
rm -rf temp_blog/common_md && mkdir temp_blog/common_md
~/.cargo/bin/obsidian-export ./temp_md/${{ env.PUBLISH_DIR }} temp_blog/common_md
- name: Move blog dir to currDir
run: |
cp -r ${{ env.BLOG_DIR }}/. .
rm -rf ${{ env.BLOG_DIR }}
rm -rf ${{ env.MD_DIR }}
cp -r temp_blog/. .
rm -rf temp_blog
rm -rf temp_md
- name: Deploy Vercel
uses: amondnet/vercel-action@v20
with: