-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (62 loc) · 2.18 KB
/
deploy.yaml
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
name: Deploy to Netlify
on:
push:
branches:
- main
repository_dispatch:
types: [zed-docs-update]
workflow_dispatch:
jobs:
deploy:
name: Deploy to Netlify
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Build site
uses: actions/setup-node@v3
with:
node-version-file: .node-version
cache: yarn
- name: Build
run: make build
# Popular action to deploy to Netlify:
# Docs: https://github.com/marketplace/actions/netlify-actions
- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
# Build output to publish to Netlify
publish-dir: ./build
github-token: ${{ secrets.GITHUB_TOKEN }}
production-branch: main
production-deploy: true
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
- name: Check for broken links
uses: ruzickap/action-my-broken-link-checker@v2
with:
url: https://zed.brimdata.io
cmd_params:
--verbose
--buffer-size=8192
--header="Accept-Encoding:zstd,br,gzip,deflate"
--header="User-Agent:Mozilla/5.0"
--exclude algolia.net
--exclude github.com\/brimdata\/.*\/edit\/
--exclude twitter.com
--exclude www.googletagmanager.com
- name: Trigger Algolia Crawler
run: |
curl -X POST -H "Content-Type: application/json" --fail-with-body \
--user "${{ secrets.ALGOLIA_CRAWLER_APP_ID }}:${{ secrets.ALGOLIA_CRAWLER_API_KEY }}" \
"https://crawler.algolia.com/api/1/crawlers/${{ secrets.ALGOLIA_CRAWLER_ID }}/reindex"
- name: Inform Slack users of failure
uses: tiloio/[email protected]
if: ${{ failure() }}
with:
slack_web_hook_url: ${{ secrets.SLACK_WEBHOOK_BRIMLABS_DOCS }}
slack_json: |
{
"username": "{{GITHUB_REPOSITORY}}",
"text": "Deploy failed: https://github.com/{{GITHUB_REPOSITORY}}/actions/runs/{{GITHUB_RUN_ID}}"
}