auto-merge.yml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. name: Automerge
  2. on:
  3. pull_request:
  4. types:
  5. - labeled
  6. - unlabeled
  7. - synchronize
  8. - opened
  9. - edited
  10. - ready_for_review
  11. - reopened
  12. - unlocked
  13. pull_request_review:
  14. types:
  15. - submitted
  16. status: {}
  17. jobs:
  18. automerge:
  19. runs-on: ubuntu-latest
  20. steps:
  21. - name: Automerge
  22. uses: 'pascalgn/automerge-action@v0.14.3'
  23. env:
  24. GITHUB_TOKEN: '${{ secrets.TOKEN }}'
  25. MERGE_LABELS: ''
  26. MERGE_FILTER_AUTHOR: 'kailong321200875'
  27. - name: Checkout
  28. uses: actions/checkout@v2
  29. - name: Use Node.js 16
  30. uses: actions/setup-node@v2.1.2
  31. with:
  32. node-version: '16.x'
  33. - name: Get Yarn Cache
  34. id: yarn-cache
  35. run: echo "::set-output name=dir::$(yarn cache dir)"
  36. - name: Cache Dependencies
  37. uses: actions/cache@v2
  38. with:
  39. path: ${{ steps.yarn-cache.outputs.dir }}
  40. key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
  41. restore-keys: |
  42. ${{ runner.os }}-yarn-
  43. - name: Set SSH Environment
  44. env:
  45. DOCS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
  46. run: |
  47. mkdir -p ~/.ssh/
  48. echo "$ACTIONS_DEPLOY_KEY" > ~/.ssh/id_rsa
  49. chmod 600 ~/.ssh/id_rsa
  50. ssh-keyscan github.com > ~/.ssh/known_hosts
  51. chmod 700 ~/.ssh && chmod 600 ~/.ssh/*
  52. git config --local user.email "321200875@qq.com"
  53. git config --local user.name "kailong321200875"
  54. - name: Build Github
  55. run: |
  56. yarn install
  57. yarn run build:pro
  58. - name: Deploy
  59. uses: peaceiris/actions-gh-pages@v3
  60. with:
  61. deploy_key: ${{secrets.ACTIONS_DEPLOY_KEY}}
  62. publish_branch: gh-pages
  63. publish_dir: ./dist-pro
  64. force_orphan: true
  65. cname: element-plus-admin.cn