From 925d818849c1854b06ba0564a40bf725a4057874 Mon Sep 17 00:00:00 2001 From: leejooy96 Date: Wed, 8 Mar 2023 13:52:06 +0900 Subject: [PATCH] pack: fix workflow build script --- .github/workflows/documents.yml | 59 ++++++++++++--------------------- docs/src/getting-started.md | 2 +- 2 files changed, 23 insertions(+), 38 deletions(-) diff --git a/.github/workflows/documents.yml b/.github/workflows/documents.yml index d66e1a1..00ae127 100644 --- a/.github/workflows/documents.yml +++ b/.github/workflows/documents.yml @@ -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 diff --git a/docs/src/getting-started.md b/docs/src/getting-started.md index 659162a..1de66a9 100644 --- a/docs/src/getting-started.md +++ b/docs/src/getting-started.md @@ -10,7 +10,7 @@ You can easily clone a repository with just the npm command. $ 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