use actions/checkout@v4 #7
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
name: Deploy | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
env: | |
AWS_DEFAULT_REGION: us-west-2 | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Dependencies | |
run: | | |
sudo apt update && | |
sudo apt install -y ruby-rubygems ruby-dev awscli && | |
sudo gem install --no-document jekyll jekyll-paginate | |
- run: jekyll build | |
- name: Sync to S3 | |
run: | | |
aws s3 sync --delete _site/ s3://${{ env.AWS_S3_BUCKET }}/ \ | |
--acl public-read --metadata-directive REPLACE \ | |
--cache-control max-age=300 --no-progress | |
env: | |
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |