Skip to content

[sync] 2024/11/02 (#1519) #15

[sync] 2024/11/02 (#1519)

[sync] 2024/11/02 (#1519) #15

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/flutter.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.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'
body: 'GitHub Action: [.github/workflows/compile_host_redirect_js.yml](https://github.com/cfug/flutter.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