123456789101112131415161718192021222324252627282930313233343536373839 |
- name: CI
- on:
- push:
- branches: [ master ]
- jobs:
- Build:
- name: Build
- runs-on: ubuntu-latest
- steps:
- - name: Checkout Source
- uses: actions/checkout@v2
- with:
- fetch-depth: 1
- - name: Setup Node.js environment
- uses: actions/setup-node@v1
- with:
- node-version: "12"
- - name: Save & Restore Npm Package Cache
- uses: actions/cache@v2
- with:
- path: ~/.npm
- key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
- restore-keys: |
- ${{ runner.os }}-node-
- - name: Install Dependencies
- run: npm install
- - name: Build
- run: npm run build
- - name: Deploy
- run: |
- cd dist
- git init
- git config user.name "${{ secrets.GIT_USER_NAME }}"
- git config user.email "${{ secrets.GIT_USER_EMAIL }}"
- git add .
- git commit -m "deploy"
- git push -f -q "https://${{ secrets.ACCESS_TOKEN }}@github.com/vue-admin-beautiful/vue-admin-beautiful-pro.git" master:gh-pages
|