| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| version: 2.1 | ||
|
|
||
| jobs: | ||
| build-site: | ||
| docker: | ||
| - image: cimg/python:3.13 | ||
| environment: | ||
| SITE_SRC: site | ||
| SITE_PATH: ${SITE_SRC}/_build/html | ||
|
|
||
| steps: | ||
| - checkout | ||
|
|
||
| - restore_cache: | ||
| keys: | ||
| - node-cache-v1 | ||
|
|
||
| - run: | ||
| name: Install Node.js | ||
| command: | | ||
| curl -fsSL https://deb.nodesource.com/setup_24.x | sudo -E bash - | ||
| sudo apt-get install -y nodejs | ||
|
|
||
| - run: | ||
| name: Install mystmd | ||
| command: | | ||
| npm install mystmd | ||
|
|
||
| - save_cache: | ||
| key: node-cache-v1 | ||
| paths: | ||
| - node_modules | ||
|
|
||
| - run: | ||
| name: Build site | ||
| command: | | ||
| export BASE_URL="/output/job/$CIRCLE_WORKFLOW_JOB_ID/artifacts/0/${SITE_PATH}" | ||
|
|
||
| (cd ${SITE_SRC} && npx myst build --html) | ||
|
|
||
| ## Temporary hack to remove unused thebe JS | ||
| rm ${SITE_PATH}/*thebe*.js | ||
|
|
||
| - store_artifacts: | ||
| path: ${SITE_PATH} | ||
|
|
||
| workflows: | ||
| version: 2 | ||
| build-and-site: | ||
| jobs: | ||
| - build-site |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| name: circleci | ||
|
|
||
| on: [status] | ||
| permissions: read-all | ||
|
|
||
| jobs: | ||
| circleci_artifacts_redirector_job: | ||
| runs-on: ubuntu-latest | ||
| if: "${{ github.event.context == 'ci/circleci: build-site' }}" | ||
| permissions: | ||
| statuses: write | ||
| name: Run CircleCI artifacts redirector | ||
| steps: | ||
| - name: GitHub Action step | ||
| uses: scientific-python/circleci-artifacts-redirector-action@839631420e45a08af893032e5a5e8843bf47e8ff | ||
| with: | ||
| repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
| api-token: ${{ secrets.CIRCLECI_ARTIFACT_REDIRECTOR_TOKEN }} | ||
| artifact-path: 0/site/_build/html/index.html | ||
| circleci-jobs: build-site | ||
| job-title: "--> site preview <--" | ||
| domain: circle.scientific-python.dev |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,46 +1,26 @@ | ||
| .PHONY: help themes html serve clean | ||
| .PHONY: help html serve clean | ||
| .DEFAULT_GOAL := help | ||
|
|
||
| help: | ||
| @grep ": ##" Makefile | grep -v grep | tr -d '#' | ||
|
|
||
| themes/scientific-python-hugo-theme: | ||
| @if [ ! -d "$<" ]; then \ | ||
| echo "*** ERROR: missing theme" ; \ | ||
| echo ; \ | ||
| echo "It looks as though you are missing the themes directory."; \ | ||
| echo "You need to add the scientific-python-hugo-theme as a submodule."; \ | ||
| echo ; \ | ||
| echo "Please see https://theme.scientific-python.org/user_guide/getstarted/"; \ | ||
| echo ; \ | ||
| exit 1; \ | ||
| fi | ||
| team.md: | ||
| team_query.py --org scientific-python --team "tools-team" > team.md | ||
|
|
||
| themes: themes/scientific-python-hugo-theme | ||
| team-clean: | ||
| rm -f team.md | ||
|
|
||
| TEAMS_DIR = content/about | ||
| TEAMS = tools-team | ||
| TEAMS_QUERY = python themes/scientific-python-hugo-theme/tools/team_query.py | ||
| team: ## generates team gallery | ||
| team: | team-clean team.md | ||
|
|
||
| $(TEAMS_DIR)/%.toml: | ||
| $(TEAMS_QUERY) --org scientific-python --team "$*" > $(TEAMS_DIR)/$*.toml | ||
| html: ## Build site in `./site/_build` | ||
| html: | ||
| (cd site; myst build --html;) | ||
|
|
||
| teams-clean: | ||
| for team in $(TEAMS); do \ | ||
| rm -f $(TEAMS_DIR)/$${team}.toml ;\ | ||
| done | ||
|
|
||
| teams: ## generates team gallery pages | ||
| teams: | teams-clean $(patsubst %,$(TEAMS_DIR)/%.toml,$(TEAMS)) | ||
|
|
||
| html: ## Build site in `./public` | ||
| html: themes | ||
| hugo | ||
|
|
||
| serve: ## Serve site, typically on http://localhost:1313 | ||
| serve: themes | ||
| @hugo --printI18nWarnings server | ||
| serve: ## Serve site, typically on http://localhost:3000 | ||
| serve: | ||
| (cd site; myst start;) | ||
|
|
||
| clean: ## Remove built files | ||
| clean: | ||
| rm -rf public | ||
| rm -rf site/_build |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,21 @@ | ||
| # tools.scientific-python.org | ||
|
|
||
| This repository hosts the source code for the website https://tools.scientific-python.org. | ||
|
|
||
| The site is implemented with the mystmd book template. | ||
|
|
||
| ### Preview Locally | ||
|
|
||
| ``` | ||
| cd site | ||
| myst start | ||
| ``` | ||
|
|
||
| ### Satisfy Prettier | ||
|
|
||
| You may have some whitespace that disagrees with the `prettier` pre-commit hook. | ||
| This will auto-fix those spots: | ||
|
|
||
| ``` | ||
| pre-commit run --all | ||
| ``` |
This file was deleted.
This file was deleted.
This file was deleted.
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.