Merge pull request #5 from mc1ovins/main

Faster Deployment by using pre-built binary
This commit is contained in:
Matthew Wong 2023-07-20 10:23:43 -04:00 committed by GitHub
commit a73da34826
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 30 additions and 31 deletions

View File

@ -10,34 +10,33 @@ jobs:
publish: publish:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
path: temp_md 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: temp_blog path: temp_blog
repository: ${{ env.BLOG_REPO }} repository: ${{ env.BLOG_REPO }}
- name: Install Rust / cargo - name: Install obsidian-export
uses: actions-rs/toolchain@v1 run: |
with: wget https://github.com/zoni/obsidian-export/releases/download/v22.11.0/obsidian-export_Linux-x86_64.bin
toolchain: stable chmod +x obsidian-export_Linux-x86_64.bin
- name: Install and run obsidian-export - name: Run obsidian-export
run: | run: |
cargo install obsidian-export rm -rf temp_blog/common_md && mkdir temp_blog/common_md
rm -rf temp_blog/common_md && mkdir temp_blog/common_md ./obsidian-export_Linux-x86_64.bin ./temp_md/${{ env.PUBLISH_DIR }} temp_blog/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 temp_blog/. .
cp -r temp_blog/. . rm -rf temp_blog
rm -rf temp_blog rm -rf temp_md
rm -rf temp_md - name: Deploy Vercel
- name: Deploy Vercel uses: amondnet/vercel-action@v20
uses: amondnet/vercel-action@v20 with:
with: # TODO: Update Github Secrets with values
# TODO: Update Github Secrets with values vercel-token: ${{ secrets.VERCEL_TOKEN }} # Required
vercel-token: ${{ secrets.VERCEL_TOKEN }} # Required vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} # Required
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} # Required vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} # Required
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} # Required vercel-args: "--prod" #Optional
vercel-args: '--prod' #Optional