Skip to content

chore: Various minor improvements, updates, & migrations (#256) #24

chore: Various minor improvements, updates, & migrations (#256)

chore: Various minor improvements, updates, & migrations (#256) #24

name: Deploy Website
on:
push:
branches:
- main
paths:
- pages/**
- static/**
- templates/**
workflow_dispatch: {}
jobs:
deploy_website:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
deployments: write
environment:
name: production
url: https://rileychase.net
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup go-task/task
uses: arduino/setup-task@v2
with:
version: 3.x
- name: Setup python
uses: actions/setup-python@v5
with:
python-version-file: .python-version
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_GITHUB_OIDC_ROLE_ARN }}
aws-region: ap-southeast-2
- name: Install Python dependencies
run: |
pip install pipenv
pipenv install --dev
echo "$(pipenv --venv)/bin" >> $GITHUB_PATH
echo "PIPENV_ACTIVE=1" >> $GITHUB_ENV
- name: Build Website
run: |
task --output group \
--output-group-begin "::group::{{.TASK}}{{if .NAME}}:{{.NAME}}{{end}}" \
--output-group-end "::endgroup::" \
build validate:links
- name: Deploy Website
run: aws s3 sync ./output s3://${{ secrets.BUCKET_NAME }}/website --exclude "**/*.md" --delete
- name: Invalidate Cache
run: aws cloudfront create-invalidation --distribution-id ${{ secrets.DISTRIBUTION_ID }} --path "/*"