Skip to content

[type: publish] add deploy file #48

[type: publish] add deploy file

[type: publish] add deploy file #48

name: dashboard Publish
on:
pull_request:
push:
branches:
- master
permissions:
actions: read
contents: read
security-events: write
env:
GITHUB_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
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
run: |
git clone https://github.com/apache/shenyu.git shenyu
cd shenyu
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 push origin shenyu_dashboard -f
git add .
git commit -m "Update Dashboard"
echo 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 | gh auth login --with-token
gh config set -h github.com git_protocol https
gh pr create --title "[type:admin] Update Dashboard" --body "Update Dashboard" --label "admin" --repo apache/shenyu