Skip to content

[type: publish] add deploy file #33

[type: publish] add deploy file

[type: publish] add deploy file #33

name: dashboard Publish
on:
pull_request:
push:
branches:
- master
jobs:
build_and_publish_job:
runs-on: ubuntu-latest
name: Build and Publish Job
steps:
-
name: Checkout Code
uses: actions/checkout@v2
with:
submodules: recursive
-
name: Setup Node
uses: actions/[email protected]
with:
node-version: "16"
-
name: Setup Dependencies
run: yarn install
-
name: Build Site
run: npm run build
-
name: Build Pull Request
env:
GH_TOKEN: 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
run: |
git clone https://github.com/apache/shenyu.git shenyu
pwd
ls -a
cd shenyu
ls -a
pwd
git checkout -b shenyu_dashboard
rm -rf shenyu-admin/src/main/resources/static/*
cp -r ../dist/* shenyu-admin/src/main/resources/static/
git config user.name "moremind"
git config user.email "[email protected]"
git add .
git commit -m "Update Dashboard"
cp -r ../mytoken.txt ../shenyu/
gh auth login --with-token < mytoken.txt
gh pr create --title "[type:admin] Update Dashboard" --body "Update Dashboard" --label "admin" --repo apache/shenyu --base master --head shenyu_dashboard