diff --git a/.github/workflows/deploy-to-production.yml b/.github/workflows/deploy-to-production.yml index 37082b2..f91a3ce 100644 --- a/.github/workflows/deploy-to-production.yml +++ b/.github/workflows/deploy-to-production.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: jobs: - preview-gh-pages: + deploy-to-production: runs-on: ubuntu-latest timeout-minutes: 15 steps: @@ -27,6 +27,11 @@ jobs: CI: true run: npm run build + - name: Run unit tests + env: + CI: true + run: npm test -- --watchAll=false + - name: Embed commit hash in index.html run: | commit_hash=$(git rev-parse HEAD) @@ -35,7 +40,7 @@ jobs: echo "Expected $index_path to exist after build" >&2 exit 1 fi - printf '\n' "$commit_hash" | cat - "$index_path" > "${index_path}.with-hash" + printf '\n' "$commit_hash" | cat - "$index_path" > "${index_path}.with-hash" mv "${index_path}.with-hash" "$index_path" echo "commit_hash=$commit_hash" >> "$GITHUB_ENV"