🐛 continue on error for cache hits #66
This file contains 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: Install Dependencies & 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- | |
- if: ${{ steps.cache-nodemodules.outputs.cache-hit != 'true' }} | |
name: List the state of node modules | |
continue-on-error: true | |
run: cd docs && npm install | |
- name: List node_modules (for debugging) | |
if: steps.cache-node-modules.outputs.cache-hit != 'true' | |
continue-on-error: true | |
run: | | |
echo "Listing node_modules as cache was not hit:" | |
ls -la docs/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 |