Skip to content

404 page.

404 page. #52

Workflow file for this run

name: Deploy
on:
push:
branches: [main]
workflow_dispatch:
jobs:
notify-build-start:
if: ${{ github.event_name == 'push' }}
runs-on: ubuntu-latest
steps:
# Send build notifications to Slack
- uses: ivelum/[email protected]
id: slack
with:
channel_id: C0528Q7QK3M
status: STARTED
color: '#ee9b00'
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
outputs:
status_message_id: ${{ steps.slack.outputs.message_id }}
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
with:
version: '0.5.x'
enable-cache: true
- run: uv run isort .
- run: uv run flake8 .
# Send notification on check failure
- name: Notify slack fail
uses: ivelum/[email protected]
if: failure()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
with:
channel_id: C0528Q7QK3M
status: FAILED
color: '#d7263d'
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.136.5'
extended: true
- env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: hugo && hugo deploy
# Send notification on build or deploy failure
- name: Notify slack fail
uses: ivelum/[email protected]
if: failure()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
with:
message_id: ${{ needs.notify-build-start.outputs.status_message_id }}
channel_id: C0528Q7QK3M
status: FAILED
color: '#d7263d'
deploy-lambda:
needs: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
with:
version: '0.5.x'
enable-cache: true
- env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
PIPE_DRIVE_API_TOKEN: ${{ secrets.PIPE_DRIVE_API_TOKEN }}
PIPE_DRIVE_LEAD_CUSTOM_DATA: ${{ secrets.PIPE_DRIVE_LEAD_CUSTOM_DATA }}
run: uv run run.py deploy-lambda
# Send notification on build or deploy failure
- name: Notify slack fail
uses: ivelum/[email protected]
if: failure()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
with:
channel_id: C0528Q7QK3M
status: FAILED
color: '#d7263d'
notify-build-success:
if: ${{ github.event_name == 'push' }}
needs: [notify-build-start, lint, deploy, deploy-lambda]
runs-on: ubuntu-latest
steps:
# Send notification on build success
- name: Notify slack success
uses: ivelum/[email protected]
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
with:
message_id: ${{ needs.notify-build-start.outputs.status_message_id }}
channel_id: C0528Q7QK3M
status: SUCCESS
color: '#16db65'