🐛 better separation #70
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: Deploy Documentation | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| build-and-deploy: | |
| name: Build and Deploy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v3 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: "18" | |
| - name: Cache node_modules | |
| id: cache-nodemodules | |
| uses: actions/cache@v3 | |
| with: | |
| path: docs/node_modules | |
| key: ${{ runner.os }}-cache-docs-nodemodules-${{ hashFiles('docs/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cache-docs-nodemodules- | |
| - name: Install Dependencies if Cache Miss | |
| if: steps.cache-nodemodules.outputs.cache-hit != 'true' | |
| run: | | |
| cd docs | |
| npm install | |
| echo "Listing node_modules as cache was not hit:" | |
| ls -la node_modules | |
| - name: Build Documentation | |
| run: | | |
| npm run docs:publish | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./docs/dist/client |