[sync] 2024/11/02 (#486) #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Compile host-redirect.min.js | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- 'firebase.json' | |
- 'tool/host-redirect/**' | |
- '.github/workflows/compile_host_redirect_js.yml' | |
permissions: | |
contents: write | |
env: | |
NODE_VERSION: 20 | |
jobs: | |
compile_host_redirect_js: | |
if: ${{ github.actor.login != 'cfug-dev' && | |
github.repository == 'cfug/dart.cn' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: Build JS | |
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 |