ci: add githubactions

This commit is contained in:
94dreamer 2021-11-26 11:40:26 +08:00
parent 9fba04f8a5
commit c1d983ca1c
3 changed files with 51 additions and 0 deletions

20
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,20 @@
# Basic dependabot.yml file with
# minimum configuration for two package managers
version: 2
updates:
# Enable version updates for npm
- package-ecosystem: "npm"
# Look for `package.json` and `lock` files in the `root` directory
directory: "/"
# Check the npm registry for updates every day (weekdays)
schedule:
interval: "monthly"
# Enable version updates for Docker
- package-ecosystem: "docker"
# Look for a `Dockerfile` in the `root` directory
directory: "/"
# Check for updates once a week
schedule:
interval: "monthly"

12
.github/workflows/pull-request.yml vendored Normal file
View File

@ -0,0 +1,12 @@
name: MAIN_PULL_REQUEST
on:
pull_request:
branches: [develop, main]
jobs:
MAIN_PULL_REQUEST:
runs-on: ubuntu-latest
steps:
- uses: actions/install-dep@develop
- run: npm run lint

19
.github/workflows/push.yml vendored Normal file
View File

@ -0,0 +1,19 @@
name: All_ON_PUSH
on: push
jobs:
All_ON_PUSH:
runs-on: ubuntu-latest
steps:
- uses: actions/install-dep@develop
- run: echo '${{ github.ref }} ... ${{ github.sha }}''
- name: build
run: npm run build
- name: upload surge service
id: deploy
run: |
export DEPLOY_DOMAIN=https://preview-${{ github.ref }}-tdesign-vue.surge.sh
npx surge --project dist --domain $DEPLOY_DOMAIN --token ${{ secrets.SURGE_TOKEN }}
- run: echo 'https://preview-${{ github.ref }}-tdesign-vue.surge.sh'
if: ${{ success() }}
- run: echo "🍏 This job's status is ${{ job.status }}."