Skip to content

fix: date.

fix: date. #229

Workflow file for this run

name: yopa.page 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 }}
- uses: actions/checkout@v3
with:
submodules: true
token: ${{ secrets.GH_TOKEN }}
fetch-depth: 1
- uses: hashicorp/setup-terraform@v2
with:
terraform_wrapper: false
- uses: aws-actions/configure-aws-credentials@v2
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 \
webp
# Set up Hugo with fast render
- uses: peaceiris/actions-hugo@v2
with:
extended: true
# Convert to WebP
- name: Convert PNG and JPG images to WebP
run: |
shopt -s nullglob extglob
for image in static/images/*.@(png|jpg); do
webp_image="${image%.*}.webp"
if [[ ! -f "$webp_image" || "$image" -nt "$webp_image" ]]; then
cwebp -q 75 "$image" -o "$webp_image"
fi
done
# Deploy website
- name: Deploy global infrastructure
run: ENV=global make deploy
- name: Deploy website
run: ENV=prod make all