[type: publish] add deploy file #26
Workflow file for this run
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: 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: ${{ secrets.GITHUB_TOKEN }} | |
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" | |
gh pr create --title "[type:admin] Update Dashboard" --body "Update Dashboard" --label "admin" --label "automated pr" --repo apache/shenyu --base master --head shenyu_dashboard | |