-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (43 loc) · 1.41 KB
/
deploy.docusaurus.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
name: Deploy
on:
pull_request:
push:
branches:
- master
jobs:
build:
runs-on: [self-hosted, linux, infrastructure-production-toolbox]
permissions:
contents: read
deployments: write
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Publish to Cloudflare Pages
id: cloudflare
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_PAGES_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: topper-docs
directory: build
- name: Add comment
uses: mshick/add-pr-comment@v2
with:
message: |
<span aria-hidden="true">🚀</span> Preview has been deployed.
| Name | Link |
|---------------------------------|------------------------|
|<span aria-hidden="true">🔨</span> Commit SHA | ${{ github.sha }} |
|<span aria-hidden="true">🔍</span> Deploy log | ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} |
|<span aria-hidden="true">🚀</span> Preview URL | [${{ steps.cloudflare.outputs.url }}](${{ steps.cloudflare.outputs.url }}) |