Skip to content

Commit b4e1958

Browse files
committed
Add step to remove empty lines from HTML in S3 publish workflow
- ADDED: Introduced a step using sed to remove empty lines from all HTML files in the _site directory prior to deployment. Signed-off-by: Leonid Petrov <lenia.petrov@gmail.com>
1 parent 92412a7 commit b4e1958

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/github-actions-s3-publish.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ jobs:
1414
- name: Build
1515
uses: jerryjvl/jekyll-build-action@v1
1616

17+
- name: Remove empty lines from HTML
18+
run: find _site -name "*.html" -type f -exec sed -i '/^[[:space:]]*$/d' {} +
19+
1720
- name: Configure AWS credentials
1821
uses: aws-actions/configure-aws-credentials@v1
1922
with:
@@ -28,7 +31,7 @@ jobs:
2831
# directory: "./_site"
2932
# # The arguments to pass to HTMLProofer
3033
# arguments: --disable-external true --allow-hash-href true --file-ignore "/_site/old.math.virginia.edu/"
31-
34+
3235
- name: Sync output to S3
3336
run: |
3437
aws s3 sync ./_site/ s3://math.virginia.edu --delete

0 commit comments

Comments
 (0)