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