-
Notifications
You must be signed in to change notification settings - Fork 16
51 lines (45 loc) · 1.32 KB
/
gh-pages.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Cache dependencies
uses: actions/cache@v4
with:
path: |
**/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}
- name: Install Dependency
run: npm install
- name: Building online versions of web pages
run: npm run buildonline
- name: Building downloadable offline versions of web pages
run: npm run buildoffline
- name: Workbox offline cache
run: npx workbox injectManifest workbox-config.js
- name: Upload GitHub Pages artifact
uses: actions/[email protected]
with:
# Upload entire repository
path: ./public-dist
- name: Deploy to GitHub Pages
id: deployment
uses: actions/[email protected]