diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 0000000..b4e8cc8 --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,31 @@ +# GitHub Copilot Instructions + +## GitHub CLI (gh) Usage + +**Important:** Shell escaping in zsh doesn't work reliably when passing multi-line strings or complex text directly to `gh` commands. Always write PR/issue descriptions to a temporary file first, then reference the file. + +### Best Practice + +Instead of: +```bash +gh pr create --title "Title" --body "Multi-line +description with special characters" +``` + +Do this: +```bash +# Write description to temporary file +cat > .tmp/pr-description.md << 'EOF' +Multi-line description +with special characters +EOF + +# Use the file +gh pr create --title "Title" --body-file .tmp/pr-description.md +``` + +### Temporary Files + +- Use `.tmp/` directory for temporary files (e.g., PR descriptions, issue bodies) +- This directory is gitignored and safe for temporary content +- Clean up files after use if needed, or leave them for debugging diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml index 4a158c0..67daeb7 100644 --- a/.github/workflows/cache.yml +++ b/.github/workflows/cache.yml @@ -24,7 +24,7 @@ jobs: uses: actions/checkout@v4 - name: Build and Cache - uses: quantecon/actions/build-jupyter-cache@v0 + uses: quantecon/actions/build-jupyter-cache@v0.6.0 with: builders: 'html' source-dir: 'lectures' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 444fc64..093c6b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,21 +20,21 @@ jobs: - name: Restore Build Cache id: cache - uses: quantecon/actions/restore-jupyter-cache@v0 + uses: quantecon/actions/restore-jupyter-cache@v0.6.0 with: cache-type: 'build' source-dir: 'lectures' save-cache: 'true' - name: Build PDF - uses: quantecon/actions/build-lectures@v0.5.0 + uses: quantecon/actions/build-lectures@v0.6.0 with: source-dir: 'lectures' builder: 'pdflatex' upload-failure-reports: true - name: Build Notebooks - uses: quantecon/actions/build-lectures@v0.5.0 + uses: quantecon/actions/build-lectures@v0.6.0 with: source-dir: 'lectures' builder: 'jupyter' @@ -42,7 +42,7 @@ jobs: - name: Build HTML id: build - uses: quantecon/actions/build-lectures@v0 + uses: quantecon/actions/build-lectures@v0.6.0 with: source-dir: 'lectures' builder: 'html' @@ -51,7 +51,7 @@ jobs: upload-failure-reports: true - name: Deploy to Netlify - uses: quantecon/actions/preview-netlify@v0 + uses: quantecon/actions/preview-netlify@v0.6.0 with: build-dir: ${{ steps.build.outputs.build-path }} netlify-auth-token: ${{ secrets.NETLIFY_AUTH_TOKEN }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0516cc1..03dad86 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -28,14 +28,14 @@ jobs: uses: actions/checkout@v4 - name: Build PDF - uses: quantecon/actions/build-lectures@v0 + uses: quantecon/actions/build-lectures@v0.6.0 with: source-dir: 'lectures' builder: 'pdflatex' upload-failure-reports: true - name: Build Notebooks - uses: quantecon/actions/build-lectures@v0 + uses: quantecon/actions/build-lectures@v0.6.0 with: source-dir: 'lectures' builder: 'jupyter' @@ -43,7 +43,7 @@ jobs: - name: Build HTML id: build - uses: quantecon/actions/build-lectures@v0 + uses: quantecon/actions/build-lectures@v0.6.0 with: source-dir: 'lectures' builder: 'html' @@ -53,6 +53,6 @@ jobs: - name: Deploy to GitHub Pages id: deploy - uses: quantecon/actions/publish-gh-pages@v0 + uses: quantecon/actions/publish-gh-pages@v0.6.0 with: build-dir: ${{ steps.build.outputs.build-path }} diff --git a/.gitignore b/.gitignore index f94768a..7023d00 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ lectures/_build .ipynb_checkpoints/ .virtual_documents/ _build/* +.tmp/