name: "Publish org-roam to GitHub Pages" inputs: org-roam-db-filename: description: "org-roam db filename" required: true deploy-to-pages: description: "Deploy to GitHub Pages" required: false default: false runs: using: "composite" steps: - name: Checkout this repo uses: actions/checkout@v4 with: repository: ikoamu/org-roam-ui-hosting path: action - name: Checkout org file repo uses: actions/checkout@v4 with: repository: ${{ github.repository }} path: orgs - name: Checkout org-roam-ui uses: actions/checkout@v4 with: repository: ikoamu/org-roam-ui ref: feature/add-export-functionality path: ui - name: Setup Node uses: actions/setup-node@v4 with: node-version: "20" # create graphdata.json and notes - name: Install graphdata generator dependencies working-directory: action run: npm install shell: bash - name: Generate graphdata.json working-directory: action run: npm run generate --script_params='../orgs/${{ inputs.org-roam-db-filename }}' shell: bash - name: Create Notes working-directory: action run: ./create_notes.sh ../orgs shell: bash # build org-roam-ui - name: Install org-roam-ui dependencies working-directory: ui run: yarn install shell: bash - name: Build org-roam-ui working-directory: ui/standalone run: ./build-standalone-server.sh ../../action/ shell: bash - name: Add nojekyll working-directory: ui run: touch ./standalone/out/.nojekyll shell: bash - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: path: "./ui/standalone/out" - name: Deploy to GitHub Pages if: ${{ inputs.deploy-to-pages == 'true' }} id: deployment uses: actions/deploy-pages@v4