Update package.json #24
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: Documentation | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '18.x' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Generate documentation | |
| run: npm run docs | |
| - name: Verify documentation assets | |
| run: | | |
| echo "Verifying documentation build..." | |
| ls -la docs/animated-backgrounds/2.0.0/ | |
| echo "Checking logo exists..." | |
| test -f docs/animated-backgrounds/2.0.0/images/logo.svg && echo "✅ Logo found" || echo "❌ Logo missing" | |
| echo "Checking main documentation..." | |
| test -f docs/animated-backgrounds/2.0.0/index.html && echo "✅ Documentation generated" || echo "❌ Documentation missing" | |
| - name: Deploy to GitHub Pages | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUBS_TOKEN }} | |
| publish_dir: ./docs/animated-backgrounds/2.0.0 | |
| enable_jekyll: false | |
| allow_empty_commit: false | |
| force_orphan: true | |
| publish_branch: gh-pages | |
| commit_message: 'docs: update documentation' |