build(deps): Bump pydantic from 1.10.11 to 2.0.1 (#165) #18
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 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 | |
steps: | |
# Set up | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Create deployment | |
uses: chrnorm/deployment-action@d42cde7132fcec920de534fffc3be83794335c00 | |
id: deployment | |
with: | |
token: ${{ github.token }} | |
environment-url: https://rileychase.net | |
initial-status: in_progress | |
- name: Setup go-task/task | |
uses: arduino/setup-task@v1 | |
with: | |
version: 3.x | |
- name: Setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install Python dependencies | |
run: | | |
pip install pipenv | |
pipenv install --dev | |
echo "$(pipenv --venv)/bin" >> $GITHUB_PATH | |
echo "PIPENV_ACTIVE=1" >> $GITHUB_ENV | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
role-to-assume: ${{ secrets.AWS_GITHUB_OIDC_ROLE_ARN }} | |
aws-region: ap-southeast-2 | |
# Build | |
- name: Build Website | |
run: | | |
task --output group \ | |
--output-group-begin "::group::{{.TASK}}{{if .NAME}}:{{.NAME}}{{end}}" \ | |
--output-group-end "::endgroup::" \ | |
build | |
# Publish | |
- name: Deploy Website | |
run: aws s3 sync ./output s3://${{ secrets.BUCKET_NAME }}/website | |
- name: Invalidate Cache | |
run: aws cloudfront create-invalidation --distribution-id ${{ secrets.DISTRIBUTION_ID }} --path "/*" | |
# Tear down | |
- name: Record deployment success | |
if: success() | |
uses: chrnorm/deployment-status@2afb7d27101260f4a764219439564d954d10b5b0 | |
with: | |
token: ${{ github.token }} | |
environment-url: ${{ steps.deployment.outputs.environment_url }} | |
deployment-id: ${{ steps.deployment.outputs.deployment_id }} | |
state: success | |
- name: Record deployment failure | |
if: failure() | |
uses: chrnorm/deployment-status@2afb7d27101260f4a764219439564d954d10b5b0 | |
with: | |
token: ${{ github.token }} | |
environment-url: ${{ steps.deployment.outputs.environment_url }} | |
deployment-id: ${{ steps.deployment.outputs.deployment_id }} | |
state: failure |