-
Notifications
You must be signed in to change notification settings - Fork 32
135 lines (112 loc) · 3.02 KB
/
build.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
name: build
on:
push:
branches:
- "**"
pull_request:
branches:
- main
jobs:
tests:
name: tests
env:
CI: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
lfs: true
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 16.x
- uses: pnpm/[email protected]
with:
version: 7.4.1
run_install: |
- recursive: false
- name: Build
run: pnpm build:all
- name: Tests
run: pnpm test
- name: Blog TS Check
run: pnpm blog:check
- name: Docs TS Check
run: pnpm docs:check
- name: Lint
run: pnpm lint:all
cypress:
name: cypress
needs: tests
env:
CI: true
runs-on: ubuntu-latest
container: cypress/included:9.2.0
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 16.x
- uses: pnpm/[email protected]
with:
version: 7.4.1
run_install: |
- recursive: false
- name: Build
run: pnpm build:all
- name: Build Docs Site
run: pnpm docs:build
- name: Cypress
run: pnpm -C docs run cy:run
- uses: actions/upload-artifact@v2
if: failure()
with:
name: cypress-screenshots
path: docs/cypress/screenshots
retention-days: 1
- uses: actions/upload-artifact@v2
if: failure()
with:
name: cypress-videos
path: docs/cypress/videos
retention-days: 1
docs:
if: github.ref == 'refs/heads/main' && contains(github.event.head_commit.message, 'docs')
name: deploy docs
needs: tests
env:
BUILD_HOOK: ${{secrets.NETLIFY_DOCS_BUILD_HOOK}}
runs-on: ubuntu-latest
steps:
- name: Netlify
run: 'curl -X POST -d {} $BUILD_HOOK'
blog:
if: github.ref == 'refs/heads/main' && contains(github.event.head_commit.message, 'blog')
name: deploy the-vue-point
needs: tests
env:
BUILD_HOOK: ${{secrets.NETLIFY_VUE_POINT_BUILD_HOOK}}
runs-on: ubuntu-latest
steps:
- name: Netlify
run: 'curl -X POST -d {} $BUILD_HOOK'
crawl:
if: github.ref == 'refs/heads/main' && (contains(github.event.head_commit.message, 'docs') || startsWith(github.event.head_commit.message, 'crawl'))
name: crawl docs
needs: docs
env:
API_KEY: ${{secrets.ALGOLIA_API_KEY}}
APPLICATION_ID: GERZE019PN
runs-on: ubuntu-latest
container: algolia/docsearch-scraper
steps:
- name: Wait for Netlify deployment
uses: whatnick/wait-action@master
with:
time: '30s'
- uses: actions/checkout@v2
- run: 'sudo apt-get install -y jq'
- run: 'echo "CONFIG=$(cat docs/.algolia/config.json | jq -r tostring)" >> $GITHUB_ENV'
- run: "cd /root && pipenv install"
- run: "cd /root && pipenv run python -m src.index"