👷 update ci

This commit is contained in:
yanyongyu 2021-02-10 11:52:34 +08:00
parent 332a3a4f93
commit 36e6f5b5c1

View File

@ -30,22 +30,22 @@ jobs:
yarn build yarn build
- name: Get Branch Name - name: Get Branch Name
run: echo "::set-env name=BRANCH_NAME::$(echo ${GITHUB_REF#refs/heads/})" run: echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
- name: Get Site ID - name: Get Site ID
if: env.BRANCH_NAME == 'master' if: env.BRANCH_NAME == 'master'
run: | run: |
echo "::set-env name=SITE_ID::${{ secrets.PROD_SITE_ID }}" echo "SITE_ID=${{ secrets.PROD_SITE_ID }}" >> $GITHUB_ENV
- name: Get Site ID - name: Get Site ID
if: env.BRANCH_NAME == 'dev' if: env.BRANCH_NAME == 'dev'
run: | run: |
echo "::set-env name=SITE_ID::${{ secrets.DEV_SITE_ID }}" echo "SITE_ID=${{ secrets.DEV_SITE_ID }}" >> $GITHUB_ENV
- name: Publish - name: Publish
uses: netlify/actions/cli@master uses: netlify/actions/cli@master
with: with:
args: deploy --dir=docs/.vuepress/dist --prod --message="Production ${BRANCH_NAME}@${{ github.event.push.after }}" args: deploy --dir=docs/.vuepress/dist --prod --message="Production ${BRANCH_NAME}@${{ github.event.push.after }}"
env: env:
NETLIFY_SITE_ID: $SITE_ID NETLIFY_SITE_ID: ${{ env.SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}