name: Quartz Publisher run-name: Quartz Publisher for Obsidian on: [push] jobs: Quartz-Build-Publish: runs-on: ubuntu-latest steps: - name: Check out repository code uses: actions/checkout@v4 - name: Organize content run: | echo "💡 The ${{ github.repository }} repository has been cloned to the runner." git checkout -b quartz mkdir content && find . -type d,f -maxdepth 1 -regextype posix-extended ! -regex '^\.$|\./(\.git|\.obsidian|\.trash|content).*' -exec mv {} content/ \; # - parallel: - name: Clone Quartz, move content run: | git clone https://github.com/jackyzha0/quartz.git mv content/* quartz/content - name: Setup Node uses: actions/setup-node@v6 working-directory: quartz/ with: node-version: 24 - name: Cache dependencies uses: actions/cache@v5 working-directory: quartz/ with: path: ~/.npm key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} restore-keys: | ${{ runner.os }}-node- - name: Cache Quartz plugins uses: actions/cache@v5 working-directory: quartz/ with: path: .quartz/plugins key: ${{ runner.os }}-plugins-${{ hashFiles('quartz.lock.json') }} restore-keys: | ${{ runner.os }}-plugins- - run: npm install && npm install wrangler working-directory: quartz/ - name: Install Quartz plugins run: npx quartz plugin install working-directory: quartz/ - name: Quartz Create run: npx quartz create --template ${{ vars.QUARTZ_CREATE_TEMPLATE }} --baseUrl ${{ vars.QUARTZ_CREATE_BASEURL }} working-directory: quartz/ - name: Quartz Build run: npx quartz build working-directory: quartz/ # - name: Wrangler deploy # workingDirectory: "quartz" # uses: cloudflare/wrangler-action@v4 # with: # apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} # command: deploy public --name=test1 - name: Wrangler deploy env: # CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} working-directory: quartz/ run: npx wrangler@3 pages deploy public --project-name=test1