Merge remote-tracking branch 'origin/develop' into stable #72
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: release web page | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| build-and-push: | |
| runs-on: ubuntu-20.04 | |
| steps: | |
| - name: Checkout Specifications | |
| uses: actions/checkout@v4 | |
| with: | |
| path: 'master-branch' | |
| - name: Install redoc-cli | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| registry-url: https://registry.npmjs.org/ | |
| - name: Build html page | |
| working-directory: master-branch | |
| run: | | |
| npm install -g @redocly/cli; | |
| npx @redocly/cli build-docs index.yml -o=doc.html; | |
| - name: Checkout pages branch | |
| uses: actions/checkout@v4 | |
| with: | |
| path: 'pages-branch' | |
| ref: 'gh-pages' | |
| - name: Rewrite html page | |
| working-directory: pages-branch | |
| run: | | |
| rm index.html | |
| mv ../master-branch/doc.html index.html | |
| - name: Push changes | |
| working-directory: pages-branch | |
| run: | | |
| git config --local user.email "action@github.com" | |
| git config --local user.name "GitHub Action" | |
| git add --all | |
| git commit -m "update pages" | |
| git push origin gh-pages | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.REGULA_GITHUB_PUSH_TOKEN }} |