Skip to content

Commit

Permalink
Fix S3 publication paths (#3750)
Browse files Browse the repository at this point in the history
Additionally make `aws s3 sync` the last command to fail in case of sync failures
  • Loading branch information
whyoleg authored Aug 19, 2024
1 parent 1a46f82 commit 3fce4ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/preview-publish-web-s3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-central-1
- name: Copy files to dokka's S3 bucket
run: ./dokka-integration-tests/aws_sync.sh s3://${{ env.bucket-name }} coroutines ../coroutines
run: ./dokka-integration-tests/aws_sync.sh s3://${{ env.bucket-name }} coroutines ${{ github.workspace }}/dokka/coroutines
- name: Print link
run: echo https://dokka-snapshots.s3.eu-central-1.amazonaws.com/${{ env.branch-name }}/coroutines/${GITHUB_SHA::7}/index.html

Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-central-1
- name: Copy files to dokka's S3 bucket
run: ./dokka-integration-tests/aws_sync.sh s3://${{ env.bucket-name }} serialization ../serialization
run: ./dokka-integration-tests/aws_sync.sh s3://${{ env.bucket-name }} serialization ${{ github.workspace }}/dokka/serialization
- name: Print link
run: echo https://dokka-snapshots.s3.eu-central-1.amazonaws.com/${{ env.branch-name }}/serialization/${GITHUB_SHA::7}/index.html

Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-central-1
- name: Copy files to dokka's S3 bucket
run: ./dokka-integration-tests/aws_sync.sh s3://${{ env.bucket-name }} ui-showcase ../ui-showcase
run: ./dokka-integration-tests/aws_sync.sh s3://${{ env.bucket-name }} ui-showcase ${{ github.workspace }}/dokka/ui-showcase
- name: Print link
run: echo https://dokka-snapshots.s3.eu-central-1.amazonaws.com/${{ env.branch-name }}/ui-showcase/${GITHUB_SHA::7}/index.html

Expand Down Expand Up @@ -116,6 +116,6 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-central-1
- name: Copy files to dokka's S3 bucket
run: ./dokka-integration-tests/aws_sync.sh s3://${{ env.bucket-name }} biojava ../biojava
run: ./dokka-integration-tests/aws_sync.sh s3://${{ env.bucket-name }} biojava ${{ github.workspace }}/dokka/biojava
- name: Print link
run: echo https://dokka-snapshots.s3.eu-central-1.amazonaws.com/${{ env.branch-name }}/biojava/${GITHUB_SHA::7}/index.html
4 changes: 2 additions & 2 deletions dokka-integration-tests/aws_sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ done
# Sync the new one
commit_hash=$(git log -1 --format="%h")

aws s3 sync "$project_path" "$s3_project_address$commit_hash/"

echo "$commit_hash"

aws s3 sync "$project_path" "$s3_project_address$commit_hash/"

0 comments on commit 3fce4ca

Please sign in to comment.