Dendron #743
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Dendron | |
on: | |
schedule: | |
- cron: "0 0 * * *" # every 24hr at midnight | |
jobs: | |
build-nextjs-site: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone Dendron (main) repo | |
uses: actions/checkout@v2 | |
with: | |
repository: Tycholiz/Dendron | |
token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} | |
path: 'main' | |
- name: Clone Dendron (publishable) repo | |
uses: actions/checkout@v2 | |
with: | |
path: 'publishable' | |
ref: main | |
fetch-depth: 0 | |
- name: Delete publishable cached files if present | |
run: "rm -rf .next && rm -rf docs && rm -rf node_modules" | |
working-directory: ./publishable | |
- name: Install node dependencies of publishable | |
run: npm install @dendronhq/[email protected] | |
working-directory: ./publishable | |
- name: Clone the Dendron Next.js repository and install dependencies | |
run: npx dendron publish init | |
working-directory: ./publishable | |
- name: Build static HTML and create the Nextjs static website | |
run: npx dendron publish export --target github --yes | |
working-directory: ./publishable | |
- name: 🚀 Deploy site to GH Pages | |
uses: peaceiris/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_branch: pages | |
publish_dir: publishable # deploy publishable directory to pages branch | |
force_orphan: true | |
enable_jekyll: false | |
cname: thoughts.kyletycholiz.com |