chore: change udd #11
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: CI | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/workflows/setup | |
- run: npm run build | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/workflows/setup | |
- run: npm run lint | |
# @template-customization-start | |
deploy_website: | |
if: "needs.pr-check.outputs.number != 'null'" | |
needs: [build, lint] | |
runs-on: ubuntu-latest | |
permissions: | |
pages: write | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/workflows/setup | |
- run: npm run build # It is faster to rebuild than to download/upload the build output. | |
- uses: actions/upload-pages-artifact@v2 | |
with: | |
path: "./build" | |
- uses: actions/deploy-pages@v2 | |
auto-format: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/workflows/setup | |
- run: npx prettier --write . | |
- uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: "chore: format with Prettier" | |
discord: | |
name: Discord Failure Notification | |
needs: [build, lint, deploy_website] | |
if: always() # This is needed to always run this job, even if the other jobs fail. | |
runs-on: ubuntu-latest | |
steps: | |
- uses: technote-space/workflow-conclusion-action@v3 | |
- if: env.WORKFLOW_CONCLUSION != 'success' && env.WORKFLOW_CONCLUSION != 'cancelled' | |
uses: sarisia/actions-status-discord@v1 | |
with: | |
webhook: ${{ secrets.DISCORD_WEBHOOK }} | |
status: ${{ env.WORKFLOW_CONCLUSION }} | |
title: "" | |
# @template-customization-end |