diff --git a/.github/workflows/compile_host_redirect_js.yml b/.github/workflows/compile_host_redirect_js.yml index 9d61ead761..a01a2184a2 100644 --- a/.github/workflows/compile_host_redirect_js.yml +++ b/.github/workflows/compile_host_redirect_js.yml @@ -6,8 +6,9 @@ on: branches: - main paths: - - "firebase.json" - - "tool/host-redirect/**" + - 'firebase.json' + - 'tool/host-redirect/**' + - '.github/workflows/compile_host_redirect_js.yml' permissions: contents: write @@ -28,5 +29,19 @@ jobs: with: node-version: ${{ env.NODE_VERSION }} - name: Build JS - run: bash ./tool/host-redirect/build.sh - shell: bash \ No newline at end of file + run: bash ./tool/host-redirect/build.sh + shell: bash + - name: Create Pull Request + uses: peter-evans/create-pull-request@v6 + with: + token: ${{ secrets.DOCS_REPO_DEPLOY_TOKEN }} + base: main + branch: bot/update-host-redirect-min-js + add-paths: | + ./src/content/assets/js/host-redirect.min.js + title: '[🤖bot] Update: host-redirect.min.js' + committer: 'cfug-dev ' + commit-message: '[🤖bot] Update: host-redirect.min.js' + branch-suffix: timestamp + labels: | + auto.PR diff --git a/tool/host-redirect/build.sh b/tool/host-redirect/build.sh index 96e07e5635..544bb093cc 100644 --- a/tool/host-redirect/build.sh +++ b/tool/host-redirect/build.sh @@ -6,11 +6,3 @@ npm run build cd - cp ./tool/host-redirect/build/host-redirect.min.js ./src/content/assets/js/host-redirect.min.js - -git init -git config --global user.name "cfug-dev" -git config --global user.email "cfug-dev@googlegroups.com" - -git add ./src/content/assets/js/host-redirect.min.js -git commit -m "[sync] Update: host-redirect.min.js" -git push -u -f \ No newline at end of file