name: "Publish Neuron Site" on: push: branches: - master jobs: neuron: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Build neuron site 🔧 run: | mkdir -p .neuron/output && touch .neuron/output/.nojekyll NEURON_DIR=$(find neuron -maxdepth 1 -type d -regex 'neuron/[a-f0-9-]\{36\}' | head -n 1) if [ -n "$NEURON_DIR" ]; then echo "Found Neuron directory: $NEURON_DIR" docker run -v $PWD:/notes sridca/neuron neuron gen --pretty-urls /notes else echo "No directory matching neuron/UUID format found" exit 1 fi - name: Deploy to gh-pages 🚀 uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: .neuron/output/