diff --git a/.forgejo/workflows/build-and-publish.yaml b/.forgejo/workflows/build-and-publish.yaml index cb7531f..13dcb5b 100644 --- a/.forgejo/workflows/build-and-publish.yaml +++ b/.forgejo/workflows/build-and-publish.yaml @@ -26,4 +26,4 @@ jobs: run: nix develop --command npx quartz build - name: Deploy - run: nix develop --command netlify deploy --auth ${{ secrets.NETLIFY_AUTH_TOKEN }} -s ${{ vars.NETLIFY_SITE_ID }} --dir public + run: nix develop --command netlify deploy --auth ${{ secrets.NETLIFY_AUTH_TOKEN }} -s ${{ vars.NETLIFY_SITE_ID }} --dir public --prod diff --git a/Justfile b/Justfile index b7923ac..3048377 100644 --- a/Justfile +++ b/Justfile @@ -1,2 +1,16 @@ +set unstable + update: - rsync -rv --delete ~/brain/brain/public/ content/ + #!/usr/bin/env bash + + if ! git diff --cached --quiet; then \ + echo "Error: there are pre-existing staged changes" && exit 1; \ + fi + + rsync -rv --delete $HOME/brain/brain/public/ content/ + git add content/ + + if ! git diff --cached --quiet; then \ + export TIMESTAMP=$(date -u +"%Y-W%V-%u %H:%M:%S"); \ + git commit -m "checkpoint: ${TIMESTAMP}"; \ + fi diff --git a/content/Deploy Docusaurus to Netlify from CI.md b/content/Deploy Docusaurus to Netlify from CI.md index 58913f6..3fadbe5 100644 --- a/content/Deploy Docusaurus to Netlify from CI.md +++ b/content/Deploy Docusaurus to Netlify from CI.md @@ -74,5 +74,5 @@ jobs: run: nix develop --command npm run build - name: Deploy - run: nix develop --command netlify deploy --auth ${{ secrets.NETLIFY_AUTH_TOKEN }} -s ${{ vars.NETLIFY_SITE_ID }} + run: nix develop --command netlify deploy --auth ${{ secrets.NETLIFY_AUTH_TOKEN }} -s ${{ vars.NETLIFY_SITE_ID }} --prod ``` \ No newline at end of file