-
Notifications
You must be signed in to change notification settings - Fork 1
63 lines (61 loc) · 2.43 KB
/
Copy pathgenerate-documentation.yml
File metadata and controls
63 lines (61 loc) · 2.43 KB
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
name: generate-documentation
on: [push]
jobs:
generate-documentation:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- uses: zhulik/redis-action@1.1.0
with:
redis version: "5"
number of databases: 1
- name: Set up project
run: |
git config --global user.name "${{ secrets.NAME }}"
git config --global user.email "${{ secrets.EMAIL }}"
cd application-server
npm install
cd ../dashboard-server
npm install
npm install faker puppeteer@2.1.1 @userdashboard/storage-redis
npm install -g mocha
- name: Generate documentation
run: |
mocha --file test-helper.js --bail --exit --full-trace --timeout 90000000 screenshots.test.js
mocha --grep returns --retries 2 --file test-helper.js --bail --exit --full-trace --recursive --timeout 90000000 "./node_modules/@userdashboard/**/*.test.js"
mocha --grep screenshots --retries 2 --file test-helper.js --bail --exit --full-trace --recursive --timeout 90000000 "./node_modules/@userdashboard/**/*.test.js"
working-directory: "./dashboard-server"
env:
NODE_ENV: testing
FAST_START: true
DASHBOARD_SERVER: "http://localhost:9000"
PORT: 9000
DOMAIN: "localhost"
GENERATE_SITEMAP_TXT: false
GENERATE_API_TXT: false
GENERATE_RESPONSE: true
GENERATE_SCREENSHOTS: true
RESPONSE_PATH: "/home/runner/work/example-web-app/example-web-app/documentation/api/example-web-app"
SCREENSHOT_PATH: "/home/runner/work/example-web-app/example-web-app/documentation/screenshots/example-web-app"
SCREENSHOT_LANGUAGES: "en"
APPLICATION_SERVER: "http://localhost:9213"
APPLICATION_SERVER_PORT: 9213
APPLICATION_SERVER_TOKEN: "this is the token"
START_APPLICATION_SERVER: "false"
STORAGE: "@userdashboard/storage-redis"
REDIS_URL: "redis://localhost:6379"
LOG_LEVEL: "info,error,warn,log"
- name: Deploy to Github Pages
uses: peaceiris/actions-gh-pages@v3
with:
external_repository: "userdashboard/userdashboard.github.io"
personal_token: ${{ secrets.DOCUMENTATION_PAT }}
publish_dir: documentation
publish_branch: master
keep_files: true