Autosave: 2024-11-04 14:26:42 #51
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: "Publish Neuron Site" | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
neuron: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build neuron site 🔧 | |
run: | | |
NEURON_DIR=$(ls -d neuron/*/ | head -n 1) | |
echo "Neuron directory: $NEURON_DIR" | |
cd $NEURON_DIR | |
docker run -v $PWD:/notes sridca/neuron neuron gen --pretty-urls | |
echo "Copying generated files..." | |
mkdir -p ../../.neuron/output | |
docker cp $(docker ps -lq):/notes/.neuron/output/. ../../.neuron/output/ | |
cd ../.. | |
echo "Contents of .neuron/output directory:" | |
ls -R .neuron/output | |
- name: Deploy to gh-pages 🚀 | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: .neuron/output/ |