-
Notifications
You must be signed in to change notification settings - Fork 479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can you set Content-type="text/html" for file without extension? #40
Comments
I have a related problem... web assembly files (*.wasm extensions) need to use content-type |
looks like you can do that with the optional args flag |
You can achieve this with the - name: Deploy html files without extension and with content type
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete --include '*' --exclude '*.*' --content-type text/html
env:
AWS_S3_BUCKET: ${{ env.BUCKET_NAME }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'eu-west-1' This excludes all files with extension (something.some_extension), and upload all files without an extension (in this case, all files without the .html extension), and set the content-type to text/html for this files. Since you can't upload all files with this content type (like js files), if you also want to upload all the other assets, you can upload all the files in another step and including all files with an extension: - name: Deploy all files
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --include '*.*'
env:
AWS_S3_BUCKET: ${{ env.BUCKET_NAME }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'eu-west-1' |
I want use URL like this "http://example.com/abc" instead of "http://example.com/abc.html",
Can you add an option to set Content-Type to text/html for files without extension?
The text was updated successfully, but these errors were encountered: