Skip to content

Commit

Permalink
chore: try fetching obsidian vault on preview
Browse files Browse the repository at this point in the history
  • Loading branch information
wodeni committed Dec 29, 2024
1 parent 177d99d commit f6b557a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,23 @@ jobs:
uses: actions/checkout@v3
with:
path: main
- name: Checkout private tools
- name: Checkout Obsidian Pool Notes
uses: actions/checkout@v4
with:
repository: wodeni/nimo-obsidian-notes-pool
token: ${{ secrets.GH_PAT_OBSIDIAN_POOL }} # `GH_PAT` is a secret that contains your PAT
token: ${{ secrets.GH_PAT_OBSIDIAN_POOL }}
path: main/pool-notes/
- name: Build deps
run: yarn
working-directory: main
- name: Build the website
run: yarn build
working-directory: main
- if: github.event_name == 'push' && github.ref == 'refs/heads/main'
name: Deploy website
uses: JamesIves/github-pages-deploy-action@4.1.4
with:
working-directory: main
branch: gh-pages
folder: dist
target-folder: .
Expand All @@ -41,6 +44,7 @@ jobs:
branch: gh-pages
folder: dist
clean: false
working-directory: main
- if: github.event_name == 'push' && github.ref == 'refs/heads/main'
name: Deploy to cmu server
uses: easingthemes/ssh-deploy@main
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,29 @@ jobs:
permissions: write-all
runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
path: main

- name: Checkout Obsidian Pool Notes
uses: actions/checkout@v4
with:
repository: wodeni/nimo-obsidian-notes-pool
token: ${{ secrets.GH_PAT_OBSIDIAN_POOL }}
path: main/pool-notes/

- name: Install and Build
run: |
yarn
yarn build -- --base /pr-preview/pr-${{ github.event.pull_request.number }}/
working-directory: main

- name: Deploy preview
uses: rossjrw/pr-preview-action@v1
with:
source-dir: ./dist/
working-directory: main

0 comments on commit f6b557a

Please sign in to comment.