fix s3 upload
This commit is contained in:
parent
c89192a37f
commit
7e37ce307a
2 changed files with 8 additions and 1 deletions
3
.github/workflows/release.yml
vendored
3
.github/workflows/release.yml
vendored
|
|
@ -22,8 +22,9 @@ jobs:
|
|||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: docs
|
||||
path: docs/
|
||||
- name: Publish to S3
|
||||
working-directory: docs
|
||||
run: |
|
||||
cd docs
|
||||
aws s3 sync --region eu-west-1 --delete . s3://diff2html.xyz --metadata-directive REPLACE --cache-control max-age=31557600
|
||||
aws cloudfront create-invalidation --region eu-west-1 --distribution-id $AWS_CF_DISTRIBUTION_ID --paths /index.html /demo.html /sitemap.xml /robots.txt
|
||||
|
|
|
|||
6
.github/workflows/test-and-publish.yml
vendored
6
.github/workflows/test-and-publish.yml
vendored
|
|
@ -26,6 +26,7 @@ jobs:
|
|||
export NEXT_VERSION="$(/bin/git-version --folder=$PWD --release-branch=master)"
|
||||
echo "Next version is ${NEXT_VERSION}"
|
||||
echo "${NEXT_VERSION}" > .version
|
||||
echo "version=${NEXT_VERSION}" >> $GITHUB_ENV
|
||||
- name: Get next npm tag name
|
||||
run: |
|
||||
if [ "${GITHUB_REF_NAME}" = "master" ]; then
|
||||
|
|
@ -140,6 +141,11 @@ jobs:
|
|||
yarn publish --tag $(cat .tag) --non-interactive --new-version $(cat .version)
|
||||
# HACK: Restore npm package name
|
||||
sed -i 's/^ "name":.*/ "name": "diff2html",/g' package.json
|
||||
- name: Tag commit
|
||||
uses: tvdias/github-tagger@v0.0.1
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
tag: "${{ env.version }}"
|
||||
- name: Upload docs
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
|
|
|
|||
Loading…
Reference in a new issue