File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed
Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change 1+ name : release web page
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+
8+ jobs :
9+ build-and-push :
10+ runs-on : ubuntu-20.04
11+ steps :
12+ - name : Checkout Specifications
13+ uses : actions/checkout@v2
14+ with :
15+ path : ' master-branch'
16+ - name : Install redoc-cli
17+ uses : actions/setup-node@v1
18+ with :
19+ node-version : 14
20+ registry-url : https://registry.npmjs.org/
21+ - name : Build html page
22+ working-directory : master-branch
23+ run : |
24+ npm install -g redoc-cli;
25+ npx redoc-cli build "./index.yml" --output doc.html \
26+ --options.maxDisplayedEnumValues=5 --options.theme.logo.gutter="20px" \
27+ --options.theme.colors.primary.main="#8a53cb" --options.expandResponses="all" \
28+ --options.expandSingleSchemaField --options.hideDownloadButton \
29+ --options.jsonSampleExpandLevel="6";
30+ - name : Checkout pages branch
31+ uses : actions/checkout@v3
32+ with :
33+ path : ' pages-branch'
34+ ref : ' gh-pages'
35+ - name : Rewrite html page
36+ working-directory : pages-branch
37+ run : |
38+ rm index.html
39+ mv ../master-branch/doc.html index.html
40+ - name : Push changes
41+ working-directory : pages-branch
42+ run : |
43+ git config --local user.email "action@github.com"
44+ git config --local user.name "GitHub Action"
45+ git add --all
46+ git commit -m "update pages"
47+ git push origin gh-pages
48+ env :
49+ GITHUB_TOKEN : ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }}
You can’t perform that action at this time.
0 commit comments