update main #140
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: how.wtf CI | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
# Shallow clone with only the last 1 commit | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
token: ${{ secrets.GH_TOKEN }} | |
fetch-depth: 1 | |
# - uses: actions/checkout@v2 | |
# with: | |
# submodules: true | |
# token: ${{ secrets.GH_TOKEN }} | |
- uses: hashicorp/setup-terraform@v1 | |
with: | |
terraform_wrapper: false | |
- 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: us-east-1 | |
# Install dependencies | |
- name: Install dependencies | |
run: | | |
sudo apt-get update -y && sudo apt install -y \ | |
libimage-exiftool-perl \ | |
jpegoptim \ | |
optipng \ | |
graphicsmagick-imagemagick-compat | |
# Set up Hugo with fast render | |
- uses: peaceiris/actions-hugo@v2 | |
with: | |
extended: true | |
args: --fastRender | |
# Deploy website | |
- name: Deploy global infrastructure | |
run: ENV=global make deploy | |
- name: Deploy website | |
run: ENV=prod make all |