Merge pull request #68 from tanish-kr/develop #41
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake | |
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby | |
name: Ruby | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: "ap-northeast-1" | |
- name: Cache bundler | |
uses: actions/cache@v2 | |
with: | |
path: vendor/bundle | |
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} | |
restore-keys: | | |
${{ runner.os }}-gems- | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.6 | |
- name: Install dependencies | |
run: | | |
bundle config path vendor/bundle | |
bundle install --jobs 4 --retry 3 | |
- name: jekyll build | |
run: bundle exec jekyll build | |
- name: deploy s3 | |
run: | | |
echo "AWS_ACCESS_KEY_ID=${{secrets.AWS_ACCESS_KEY_ID}}" >> $GITHUB_ENV | |
echo "AWS_SECRET_ACCESS_KEY=${{secrets.AWS_SECRET_ACCESS_KEY}}" >> $GITHUB_ENV | |
./_script/deploy.sh | |
shell: bash |