-
Notifications
You must be signed in to change notification settings - Fork 0
106 lines (99 loc) · 4.2 KB
/
dev-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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Deploy to staging
on:
pull_request:
branches:
- main
permissions:
contents: read
deployments: write
pull-requests: write
jobs:
publish:
runs-on: ubuntu-latest
outputs:
url: ${{ steps.page.outputs.deployment-url }}
steps:
- name: Setup | Comment deploy start
uses: mshick/[email protected]
with:
message-id: dev-deploy
message: |
### <span aria-hidden="true">🚧</span> Deploy Preview building...
| Name | Link |
|---------------------------------|------------------------|
|<span aria-hidden="true">🔨</span> Latest commit | ${{ github.sha }} |
|<span aria-hidden="true">🔍</span> Latest deploy log | ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} |
---
- uses: actions/[email protected]
- name: Setup | Node.js
uses: re-taro/actions/[email protected]
with:
node-version-file: .nvmrc
- name: Deploy | Build
run: pnpm build
- name: Deploy | Deploy to Cloudflare Pages
id: page
uses: cloudflare/[email protected]
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
command: pages deploy --project-name 2024-hp --directory build/client
- name: PostDeploy | Comment deploy url
uses: mshick/[email protected]
with:
message-id: cloudflare-deploy
message: |
### <span aria-hidden="true">✅</span> Deploy Preview ready!
| Name | Link |
|---------------------------------|------------------------|
|<span aria-hidden="true">🔨</span> Latest commit | ${{ github.sha }} |
|<span aria-hidden="true">🔍</span> Latest deploy log | ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} |
|<span aria-hidden="true">😎</span> Deploy Preview Url | [${{ steps.page.outputs.deployment-url }}](${{ steps.page.outputs.deployment-url }}) |
---
lighthouse:
needs: publish
uses: ./.github/workflows/lighthouse.yml
with:
url: ${{ needs.publish.outputs.url }}
storybook:
runs-on: ubuntu-latest
steps:
- name: Setup | Comment deploy start
uses: mshick/[email protected]
with:
message-id: sb-deploy
message: |
### <span aria-hidden="true">🚧</span> Deploy Preview building...
| Name | Link |
|---------------------------------|------------------------|
|<span aria-hidden="true">🔨</span> Latest commit | ${{ github.sha }} |
|<span aria-hidden="true">🔍</span> Latest deploy log | ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} |
---
- uses: actions/[email protected]
- name: Setup | Node.js
uses: re-taro/actions/[email protected]
with:
node-version-file: .nvmrc
- name: Deploy | Build Storybook
run: pnpm build-storybook
- name: Deploy | Build
run: pnpm build
- name: Deploy | Deploy to Cloudflare Pages
id: page
uses: cloudflare/[email protected]
with:
apiToken: ${{ secrets.CF_SB_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
command: pages deploy --project-name 2024-hp-sb --directory storybook-static
- name: PostDeploy | Comment deploy url
uses: mshick/[email protected]
with:
message-id: cloudflare-sb-deploy
message: |
### <span aria-hidden="true">✅</span> Deploy Storybook Preview ready!
| Name | Link |
|---------------------------------|------------------------|
|<span aria-hidden="true">🔨</span> Latest commit | ${{ github.sha }} |
|<span aria-hidden="true">🔍</span> Latest deploy log | ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} |
|<span aria-hidden="true">😎</span> Deploy Preview Url | [${{ steps.page.outputs.deployment-url }}](${{ steps.page.outputs.deployment-url }}) |
---