-
Notifications
You must be signed in to change notification settings - Fork 30
49 lines (45 loc) · 1.51 KB
/
deploy.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
name: Deploy to GH Pages
on:
push:
branches:
- master
jobs:
deploy-to-pages:
name: Deploy to GH Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v4
with:
node-version: '20.x'
- run: npm install --legacy-peer-deps
- run: npm run build
env:
NODE_OPTIONS: --openssl-legacy-provider
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
# note: watch for v4 to be released
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: build
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
commit_message: deploying latest module builder
- name: Slack Notification on Failure
uses: 8398a7/action-slack@v3
if: failure()
with:
status: custom
job_name: Deploy
author_name: Deploy Workflow
fields: workflow,commit,repo,author,took
# see https://action-slack.netlify.app/usecase/02-custom for custom payload info
custom_payload: |
{
attachments: [{
color: 'danger',
text: `${process.env.AS_WORKFLOW} -- (${process.env.AS_COMMIT}) of ${process.env.AS_REPO}@master by ${process.env.AS_AUTHOR} ${{ job.status }} in ${process.env.AS_TOOK}`,
}]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}