Ship dist/ in npm tarball + document jsDelivr CDN usage #11
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
| # Build the Vite multi-page site and deploy to GitHub Pages. | |
| # The repo serves under /gentelella/ on Pages, so BASE_PATH matches. | |
| name: Deploy to GitHub Pages | |
| on: | |
| push: | |
| branches: ["master"] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'npm' | |
| # Skip the Playwright Chromium download — deploy job doesn't need a | |
| # browser, and that's ~170 MB of cache savings per run. | |
| - run: npm ci | |
| env: | |
| PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1' | |
| - run: npm run lint | |
| - name: Build | |
| run: BASE_PATH=/gentelella/ npm run build | |
| - uses: actions/configure-pages@v5 | |
| - uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: dist | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - id: deployment | |
| uses: actions/deploy-pages@v4 |