pack: fix workflow build script

This commit is contained in:
leejooy96 committed 2023-03-08 13:52:06 +09:00
1 parent 7825f563db
commit 925d818849
2 files changed
+23 -38

No files matched your search

+22 -37
View File
@@ -10,44 +10,7 @@ on:
workflow_dispatch:
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:
needs: find-and-replace-index-file
runs-on: ubuntu-latest
defaults:
run:
@@ -64,6 +27,14 @@ jobs:
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 ./src/public
- name: Copy image asset (sample)
run: cp ../.github/resources/vutron-sample.webp ./src/public
# cache node_modules
- name: Cache dependencies
uses: actions/cache@v2
@@ -80,6 +51,20 @@ jobs:
if: steps.npm-cache.outputs.cache-hit != 'true'
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
- name: Build VitePress site
run: npm run build