Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/justinharringa/actions-s3_website
GitHub Action and Docker image to run s3_website (https://github.com/laurilehmijoki/s3_website/)
https://github.com/justinharringa/actions-s3_website
docker docker-image github-actions jamstack s3
Last synced: about 2 months ago
JSON representation
GitHub Action and Docker image to run s3_website (https://github.com/laurilehmijoki/s3_website/)
- Host: GitHub
- URL: https://github.com/justinharringa/actions-s3_website
- Owner: justinharringa
- License: other
- Created: 2019-01-06T01:34:43.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-07-09T13:49:41.000Z (over 3 years ago)
- Last Synced: 2023-05-17T12:15:54.714Z (over 1 year ago)
- Topics: docker, docker-image, github-actions, jamstack, s3
- Language: Dockerfile
- Homepage: https://hub.docker.com/r/justinharringa/s3_website/
- Size: 12.7 KB
- Stars: 11
- Watchers: 0
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GitHub Action / Docker container for s3_website
GitHub Action and [Docker container](https://hub.docker.com/r/justinharringa/s3_website/)
to run [s3_website](https://github.com/laurilehmijoki/s3_website/)## Docker Usage
This container has been published to Docker Hub and can be used as a container. To run it,
you'd run something like:```
docker run --rm -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY
-e S3_BUCKET -e AWS_CLOUDFRONT_DISTRIBUTION --mount type=bind,source="$(pwd)",target=/site,readonly
justinharringa/s3_website push --site _site
```If you don't pass any arguments you'll see the equivalent of `s3_website help`. Note that you'll mount
your host location into `/site` and will also need to pass in any environment variables that your
`s3_website.yml` or `s3_website` itself requires.[Docker Hub - justinharringa/s3_website](https://hub.docker.com/r/justinharringa/s3_website/)
## GitHub Actions Usage
The following example uses this GitHub Action to push the contents of the `build` folder to an
S3 bucket and update a CloudFront distribution. It still requires that you provide an `s3_website.yml`
such as [s3_website.yml](/example/s3_website.yml).```
- name: Deploy
uses: docker://justinharringa/s3_website:master
with:
args: 'push --site build'
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
S3_BUCKET: ${{ secrets.S3_BUCKET }}
AWS_CLOUDFRONT_DISTRIBUTION: ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION }}
```## Why?
I have been using s3_website for quite some time and it works great
(huge thanks to [Lauri Lehmijoki](https://github.com/laurilehmijoki) /
[Philippe Creux](https://github.com/pcreux)!!). I am giving GitHub Actions a shot and want to
use s3_website within a Docker container both in GitHub Actions and also for some other workflows
where I don't really want to have to worry about making sure the Java/Ruby bits are correct and
available. Thus far, this seems to work out quite well. Ideally, I'd like to contribute the Dockerfile
to [s3_website](https://github.com/laurilehmijoki/s3_website/).