Skip to content

[sync] 2024/10/02 (#481) #5

[sync] 2024/10/02 (#481)

[sync] 2024/10/02 (#481) #5

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