Merge pull request #124 from tiddly-gittly/renovate/actions-checkout-6.x #189
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 Tiddlywiki To Github Pages | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| # paths: | |
| # - "plugins/**" | |
| # - "tiddlers/**" | |
| # - "package.json" | |
| # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
| permissions: | |
| contents: write | |
| pages: write | |
| id-token: write | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: lts/* | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 'latest' | |
| run_install: false | |
| - name: Cache dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| **/node_modules | |
| key: ${{ runner.os }}-${{ hashFiles('**/package.json') }} | |
| - name: Install Dependency | |
| run: pnpm install | |
| - name: Building online and offline versions | |
| run: pnpm run build | |
| - name: Upload GitHub Pages artifact | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| # Upload entire repository | |
| path: ./public-dist | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |