mirror of
https://github.com/BorysLevytskyi/BitwiseCmd.git
synced 2025-12-10 15:02:07 +01:00
Update deploy workflow
This commit is contained in:
9
.github/workflows/deploy-to-production.yml
vendored
9
.github/workflows/deploy-to-production.yml
vendored
@@ -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 '<!-- Commit: %s -->\n' "$commit_hash" | cat - "$index_path" > "${index_path}.with-hash"
|
||||
printf '<!-- Howdy! So you like looking at other people\'s html sources, huh? I do it too. Anyway, the commit hash is %s -->\n' "$commit_hash" | cat - "$index_path" > "${index_path}.with-hash"
|
||||
mv "${index_path}.with-hash" "$index_path"
|
||||
echo "commit_hash=$commit_hash" >> "$GITHUB_ENV"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user