Publish #133
This file contains hidden or 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: Publish | |
| on: | |
| workflow_run: | |
| workflows: ["Test"] | |
| types: [completed] | |
| branches: | |
| - "main" | |
| permissions: | |
| contents: read | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| name: Publish Logseq SPA | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Build | |
| uses: logseq/[email protected] | |
| with: | |
| theme-mode: dark | |
| accent-color: purple | |
| output-directory: dist | |
| - name: Show Changes | |
| run: | | |
| git status -s | |
| ls dist/ | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| cache: "npm" | |
| node-version: "latest" | |
| check-latest: true | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Deploy | |
| run: npm run deploy | |
| env: | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| publish-data: | |
| runs-on: ubuntu-latest | |
| name: Publish Linked Data | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ github.head_ref }} | |
| - uses: actions/setup-node@v6 | |
| with: | |
| cache: "npm" | |
| node-version: "latest" | |
| check-latest: true | |
| - name: Export graph as RDF | |
| uses: logseq/[email protected] | |
| with: | |
| rdfFile: notes.nq | |
| - name: Convert N-Quads to JSON-LD | |
| run: | | |
| npm ci | |
| npm run convert | |
| - uses: stefanzweifel/git-auto-commit-action@v7 | |
| with: | |
| file_pattern: "notes.nq notes.jsonld" | |
| commit_message: "Update linked data" |