-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (43 loc) · 1.49 KB
/
deploy-vue.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: Deploy
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
- name: Install dependencies
working-directory: ./app
run: yarn install
- name: Build
working-directory: ./app
run: yarn build-only
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./app/dist
notify-on-failure:
runs-on: ubuntu-latest
needs: [deploy]
if: failure()
steps:
- name: Notify failure
uses: "ravsamhq/[email protected]"
with:
status: failure
notification_title: "Deploy failed on ${{ github.ref_name }} - <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Failure>"
message_format: ":fire: *Deploy Rock-paper-scissors site to Pages* in <${{ github.server_url }}/${{ github.repository }}/${{ github.ref_name }}|${{ github.repository }}>"
footer: "Linked Repo <${{ github.server_url }}/${{ github.repository }}|${{ github.repository }}> | <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Failure>"
env:
SLACK_WEBHOOK_URL: ${{ secrets.DEPLOY_FAIL_SLACK }}