mirror of
https://github.com/BorysLevytskyi/BitwiseCmd.git
synced 2025-12-20 03:32:40 +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:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
preview-gh-pages:
|
deploy-to-production:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
steps:
|
steps:
|
||||||
@@ -27,6 +27,11 @@ jobs:
|
|||||||
CI: true
|
CI: true
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
||||||
|
- name: Run unit tests
|
||||||
|
env:
|
||||||
|
CI: true
|
||||||
|
run: npm test -- --watchAll=false
|
||||||
|
|
||||||
- name: Embed commit hash in index.html
|
- name: Embed commit hash in index.html
|
||||||
run: |
|
run: |
|
||||||
commit_hash=$(git rev-parse HEAD)
|
commit_hash=$(git rev-parse HEAD)
|
||||||
@@ -35,7 +40,7 @@ jobs:
|
|||||||
echo "Expected $index_path to exist after build" >&2
|
echo "Expected $index_path to exist after build" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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"
|
mv "${index_path}.with-hash" "$index_path"
|
||||||
echo "commit_hash=$commit_hash" >> "$GITHUB_ENV"
|
echo "commit_hash=$commit_hash" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user