diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index ee9eae2..afbc5e4 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -26,7 +26,7 @@ jobs: run: swift run - name: Deploy S3 Website if: ${{ github.event.pull_request.head.repo.full_name == 'vapor/website' && github.actor != 'dependabot[bot]' }} - uses: brokenhandsio/s3-website-pr-action@v2 + uses: brokenhandsio/s3-website-pr-action@v2.0.2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} AWS_ACCESS_KEY_ID: ${{ secrets.SITE_DEPLOYER_ACCESS_KEY_ID }} @@ -35,3 +35,5 @@ jobs: bucket-prefix: "vapor-website-pulls" folder-to-copy: "./Output" bucket-region: "eu-west-2" + error-document: "404.html" + diff --git a/stack.yml b/stack.yml index b0d8cd7..6465210 100644 --- a/stack.yml +++ b/stack.yml @@ -21,7 +21,7 @@ Resources: WebsiteConfiguration: IndexDocument: index.html # Redirect - ErrorDocument: /error/404/index.html + ErrorDocument: error/404/index.html RoutingRules: - RoutingRuleCondition: HttpErrorCodeReturnedEquals: '404' @@ -49,6 +49,9 @@ Resources: - ErrorCode: 403 ResponseCode: 404 ResponsePagePath: '/error/404/index.html' + - ErrorCode: 404 + ResponseCode: 404 + ResponsePagePath: '/error/404/index.html' DefaultCacheBehavior: AllowedMethods: - GET