Skip to content

Commit

Permalink
Update: compile_host_redirect_js automated pull request (#471)
Browse files Browse the repository at this point in the history
  • Loading branch information
AmosHuKe authored Jul 2, 2024
1 parent 11ec72e commit 09a0014
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
24 changes: 20 additions & 4 deletions .github/workflows/compile_host_redirect_js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -28,5 +29,20 @@ jobs:
with:
node-version: ${{ env.NODE_VERSION }}
- name: Build JS
run: bash ./tool/host-redirect/build.sh
shell: bash
run: bash ./tool/host-redirect/build.sh
shell: bash
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.CFUG_DEV_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'
body: 'GitHub Action: [.github/workflows/compile_host_redirect_js.yml](https://github.com/cfug/dart.cn/blob/main/.github/workflows/compile_host_redirect_js.yml)'
committer: 'cfug-dev <[email protected]>'
commit-message: '[🤖bot] Update: host-redirect.min.js'
branch-suffix: timestamp
labels: |
auto.PR
8 changes: 0 additions & 8 deletions tool/host-redirect/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "[email protected]"

git add ./src/content/assets/js/host-redirect.min.js
git commit -m "[🤖bot] Update: host-redirect.min.js"
git push -u -f

0 comments on commit 09a0014

Please sign in to comment.