-
Notifications
You must be signed in to change notification settings - Fork 169
50 lines (43 loc) · 1.2 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
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
discord:
name: Discord Failure Notification
needs: [build, lint, deploy_website]
if: failure()
runs-on: ubuntu-latest
steps:
- uses: sarisia/actions-status-discord@v1
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
status: failure
title: ""
# @template-customization-end