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