From 52243ec69ba1bd81dcf445e0545b5c26c386a3a7 Mon Sep 17 00:00:00 2001 From: PJ568 Date: Mon, 26 Feb 2024 11:44:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=BD=91=E9=A1=B5=E5=8E=8B?= =?UTF-8?q?=E7=BC=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/568tools_Release.yml | 158 ++++++++++++------------- 1 file changed, 79 insertions(+), 79 deletions(-) diff --git a/.github/workflows/568tools_Release.yml b/.github/workflows/568tools_Release.yml index 95590abd..e845a399 100644 --- a/.github/workflows/568tools_Release.yml +++ b/.github/workflows/568tools_Release.yml @@ -1,80 +1,80 @@ -name: Release - -on: - push: - branches: - - '**' - - '!release' - -jobs: - Release: - runs-on: ubuntu-latest - - steps: - - name: Clone assets branch - run: | - echo '创建 tree/:' - mkdir /home/runner/tree - echo '克隆 三个分支:' - git clone https://github.com/PJ-568/568tools.git -b assets /home/runner/tree/assets - echo '检查 tree/assets:' - ls /home/runner/tree/assets - - - name: Checkout main branch - uses: actions/checkout@v4 - with: - ref: main - submodules: recursive - - - name: Merge main with assets - run: | - echo '复制 tree/assets/* 到 .:' - cp -v -u -r /home/runner/tree/assets/* . - - - name: Delete 冗 - run: | - rm -r lib/tools/dwv/doc/ - rm -r lib/tools/webp2jpg-online/doc/ - - - name: HTML/CSS/JS Minifier - uses: docker://devatherock/minify-js:2.0.0 - with: - add_suffix: false # Optional - - - name: Generate the sitemap - id: sitemap - uses: cicirello/generate-sitemap@v1 - with: - base-url-path: https://tools.pj568.eu.org/ - - - name: Output sitemap stats - run: | - echo "sitemap-path = ${{ steps.sitemap.outputs.sitemap-path }}" - echo "url-count = ${{ steps.sitemap.outputs.url-count }}" - echo "excluded-count = ${{ steps.sitemap.outputs.excluded-count }}" - - - name: Deploy as pages - uses: JamesIves/github-pages-deploy-action@v4 - with: - branch: release # The branch the action should deploy to. - folder: . # The folder the action should deploy. - - # - name: Checkout release branch - # uses: actions/checkout@v3 - # with: - # ref: release - - # - name: Update tool lib - # run: | - # rm -r ./lib/ - # git config --global user.name "PJ569-bot" - # git config --global user.email "LiuTian-PJ568@PJ568.eu.org" - # git submodule update - # # git rm --cached lib - # # git submodule add -b tools https://github.com/PJ-568/568tools.git ./lib - # # git add ./lib/ - # git commit -m '库更新' - # git push - - - name: Ping Google +name: Release + +on: + push: + branches: + - '**' + - '!release' + +jobs: + Release: + runs-on: ubuntu-latest + + steps: + - name: Clone assets branch + run: | + echo '创建 tree/:' + mkdir /home/runner/tree + echo '克隆 三个分支:' + git clone https://github.com/PJ-568/568tools.git -b assets /home/runner/tree/assets + echo '检查 tree/assets:' + ls /home/runner/tree/assets + + - name: Checkout main branch + uses: actions/checkout@v4 + with: + ref: main + submodules: recursive + + - name: Merge main with assets + run: | + echo '复制 tree/assets/* 到 .:' + cp -v -u -r /home/runner/tree/assets/* . + + - name: Delete 冗 + run: | + rm -r lib/tools/dwv/doc/ + rm -r lib/tools/webp2jpg-online/doc/ + + - name: HTML/CSS/JS Minifier + uses: docker://devatherock/minify-js:3.0.0 + with: + add_suffix: false + + - name: Generate the sitemap + id: sitemap + uses: cicirello/generate-sitemap@v1 + with: + base-url-path: https://tools.pj568.eu.org/ + + - name: Output sitemap stats + run: | + echo "sitemap-path = ${{ steps.sitemap.outputs.sitemap-path }}" + echo "url-count = ${{ steps.sitemap.outputs.url-count }}" + echo "excluded-count = ${{ steps.sitemap.outputs.excluded-count }}" + + - name: Deploy as pages + uses: JamesIves/github-pages-deploy-action@v4 + with: + branch: release # The branch the action should deploy to. + folder: . # The folder the action should deploy. + + # - name: Checkout release branch + # uses: actions/checkout@v3 + # with: + # ref: release + + # - name: Update tool lib + # run: | + # rm -r ./lib/ + # git config --global user.name "PJ569-bot" + # git config --global user.email "LiuTian-PJ568@PJ568.eu.org" + # git submodule update + # # git rm --cached lib + # # git submodule add -b tools https://github.com/PJ-568/568tools.git ./lib + # # git add ./lib/ + # git commit -m '库更新' + # git push + + - name: Ping Google run: curl https://www.google.com/ping?sitemap=https://Tools.PJ568.eu.org/sitemap.xml \ No newline at end of file