👷 update ci

This commit is contained in:
yanyongyu 2021-02-10 13:42:09 +08:00
parent eeec690e71
commit 7b2af1b2f3

View File

@ -32,21 +32,11 @@ jobs:
- name: Get Branch Name - name: Get Branch Name
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
- name: Production Deploy
if: github.event_name == 'push' && env.BRANCH_NAME == 'master'
uses: nwtgck/actions-netlify@v1.1
with:
publish-dir: './docs/.vuepress/dist'
production-branch: ${{ env.BRANCH_NAME }}
production-deploy: true
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: 'Production Deploy ${{ env.BRANCH_NAME }}@${{ github.sha }}'
- name: Deploy to Netlify - name: Deploy to Netlify
uses: nwtgck/actions-netlify@v1.1 uses: nwtgck/actions-netlify@v1.1
with: with:
publish-dir: './docs/.vuepress/dist' publish-dir: './docs/.vuepress/dist'
production-branch: ${{ env.BRANCH_NAME }} production-branch: master
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: 'Deploy ${{ env.BRANCH_NAME }}@${{ github.sha }}' deploy-message: 'Deploy ${{ env.BRANCH_NAME }}@${{ github.sha }}'
env: env: