Skip to content

Commit 7e37ce3

Browse files
committed
fix s3 upload
1 parent c89192a commit 7e37ce3

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ jobs:
2222
uses: actions/download-artifact@v3
2323
with:
2424
name: docs
25+
path: docs/
2526
- name: Publish to S3
27+
working-directory: docs
2628
run: |
27-
cd docs
2829
aws s3 sync --region eu-west-1 --delete . s3://diff2html.xyz --metadata-directive REPLACE --cache-control max-age=31557600
2930
aws cloudfront create-invalidation --region eu-west-1 --distribution-id $AWS_CF_DISTRIBUTION_ID --paths /index.html /demo.html /sitemap.xml /robots.txt

.github/workflows/test-and-publish.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
export NEXT_VERSION="$(/bin/git-version --folder=$PWD --release-branch=master)"
2727
echo "Next version is ${NEXT_VERSION}"
2828
echo "${NEXT_VERSION}" > .version
29+
echo "version=${NEXT_VERSION}" >> $GITHUB_ENV
2930
- name: Get next npm tag name
3031
run: |
3132
if [ "${GITHUB_REF_NAME}" = "master" ]; then
@@ -140,6 +141,11 @@ jobs:
140141
yarn publish --tag $(cat .tag) --non-interactive --new-version $(cat .version)
141142
# HACK: Restore npm package name
142143
sed -i 's/^ "name":.*/ "name": "diff2html",/g' package.json
144+
- name: Tag commit
145+
uses: tvdias/[email protected]
146+
with:
147+
repo-token: "${{ secrets.GITHUB_TOKEN }}"
148+
tag: "${{ env.version }}"
143149
- name: Upload docs
144150
uses: actions/upload-artifact@v3
145151
with:

0 commit comments

Comments
 (0)