pack: fix workflow build script
This commit is contained in:
1 parent
7825f563db
commit
925d818849
2 files changed
+23
-38
No files matched your search
@@ -10,44 +10,7 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
find-and-replace-index-file:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
# fetch all commits to get last updated time or other git log info
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@v1
|
|
||||||
with:
|
|
||||||
node-version: '18'
|
|
||||||
|
|
||||||
# copy and replace string index.md file
|
|
||||||
- name: Copy and replace string index.md file
|
|
||||||
run: cp README.md docs/src/index.md
|
|
||||||
- name: Copy image asset (logo)
|
|
||||||
run: cp src/renderer/public/images/vutron-logo.webp docs/src/public
|
|
||||||
- name: Copy image asset (sample)
|
|
||||||
run: cp .github/resources/vutron-sample.webp docs/src/public
|
|
||||||
|
|
||||||
- name: Find and Replace (logo)
|
|
||||||
uses: jacobtomlinson/gha-find-replace@v2
|
|
||||||
with:
|
|
||||||
find: "src/renderer/public/images/vutron-logo.webp"
|
|
||||||
replace: "public/vutron-logo.webp"
|
|
||||||
regex: false
|
|
||||||
|
|
||||||
- name: Find and Replace (sample)
|
|
||||||
uses: jacobtomlinson/gha-find-replace@v2
|
|
||||||
with:
|
|
||||||
find: ".github/resources/vutron-sample.webp"
|
|
||||||
replace: "public/vutron-sample.webp"
|
|
||||||
regex: false
|
|
||||||
|
|
||||||
build-documentation-pages:
|
build-documentation-pages:
|
||||||
needs: find-and-replace-index-file
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
@@ -64,6 +27,14 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: '18'
|
node-version: '18'
|
||||||
|
|
||||||
|
# copy and replace string index.md file
|
||||||
|
- name: Copy and replace string index.md file
|
||||||
|
run: cp ../README.md docs/src/index.md
|
||||||
|
- name: Copy image asset (logo)
|
||||||
|
run: cp ../src/renderer/public/images/vutron-logo.webp ./src/public
|
||||||
|
- name: Copy image asset (sample)
|
||||||
|
run: cp ../.github/resources/vutron-sample.webp ./src/public
|
||||||
|
|
||||||
# cache node_modules
|
# cache node_modules
|
||||||
- name: Cache dependencies
|
- name: Cache dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
@@ -80,6 +51,20 @@ jobs:
|
|||||||
if: steps.npm-cache.outputs.cache-hit != 'true'
|
if: steps.npm-cache.outputs.cache-hit != 'true'
|
||||||
run: npm install
|
run: npm install
|
||||||
|
|
||||||
|
- name: Find and Replace (logo)
|
||||||
|
uses: jacobtomlinson/gha-find-replace@v2
|
||||||
|
with:
|
||||||
|
find: "src/renderer/public/images/vutron-logo.webp"
|
||||||
|
replace: "public/vutron-logo.webp"
|
||||||
|
regex: false
|
||||||
|
|
||||||
|
- name: Find and Replace (sample)
|
||||||
|
uses: jacobtomlinson/gha-find-replace@v2
|
||||||
|
with:
|
||||||
|
find: ".github/resources/vutron-sample.webp"
|
||||||
|
replace: "public/vutron-sample.webp"
|
||||||
|
regex: false
|
||||||
|
|
||||||
# run build script
|
# run build script
|
||||||
- name: Build VitePress site
|
- name: Build VitePress site
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ You can easily clone a repository with just the npm command.
|
|||||||
$ npm init vutron
|
$ npm init vutron
|
||||||
```
|
```
|
||||||
|
|
||||||
The above method will not create unnecessary documentation and .github related files for your project.
|
The above method will not create unnecessary documentation and `.github` related files for your project.
|
||||||
|
|
||||||
### Method 2: Use this template
|
### Method 2: Use this template
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user