[type: publish] add deploy file #49
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 | |
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 [email protected]:apache/shenyu.git | |
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 | |