diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index 6cd10ed..244c8f8 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -57,8 +57,6 @@ jobs: if: steps.cache.outputs.cache-hit != 'true' run: | apt-get update -qq && apt-get install -y -qq make - # running as root: mark the checkout safe so the data.json commit stamp works - git config --global --add safe.directory "$GITHUB_WORKSPACE" sage -pip install --quiet --no-cache-dir pandas seaborn make sweeps derived data figures PYTHON="sage -python" diff --git a/export_site_data.sage b/export_site_data.sage index 0087cf2..c3d03d4 100644 --- a/export_site_data.sage +++ b/export_site_data.sage @@ -204,7 +204,8 @@ def _commit(): ['git', 'rev-parse', '--short', 'HEAD'], cwd=_dir, stderr=subprocess.DEVNULL).decode().strip() except Exception: - return 'unknown' + sha = os.environ.get('GITHUB_SHA', '') + return sha[:7] if sha else 'unknown' data = {