delete data #68
This file contains hidden or 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: Jupyter Book v2 (MyST) GitHub Pages Deploy | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| env: | |
| BASE_URL: /${{ github.event.repository.name }} | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v3 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18.x | |
| - name: Install MyST Markdown (mystmd) | |
| run: npm install -g mystmd | |
| - name: Build HTML Assets | |
| id: build | |
| run: | | |
| set -euxo pipefail | |
| # Find the MyST/Jupyter Book v2 project root | |
| MYST_FILE="$(find . -maxdepth 3 -name myst.yml -print -quit || true)" | |
| if [ -z "$MYST_FILE" ]; then | |
| echo "ERROR: Could not find myst.yml (Jupyter Book v2 requires it)." | |
| echo "Repo contents:" | |
| ls -lah | |
| exit 1 | |
| fi | |
| MYST_DIR="$(cd "$(dirname "$MYST_FILE")" && pwd)" | |
| echo "Building from: $MYST_DIR" | |
| cd "$MYST_DIR" | |
| myst build --html | |
| test -d _build/html | |
| ls -lah _build/html | |
| echo "html_path=$MYST_DIR/_build/html" >> "$GITHUB_OUTPUT" | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ${{ steps.build.outputs.html_path }} | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |