迭代版权标准 #97
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build-and-deploy | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- name: Install and Build | |
run: | | |
npm install | |
npm i vitepress -D | |
npm run docs:build | |
- name: Deploy | |
uses: JamesIves/github-pages-deploy-action@v4.4.3 | |
with: | |
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
BRANCH: gh-pages | |
FOLDER: 'rustedwarfareapicode/.vitepress/dist' | |
# 判断工作流是否全部成功,如果有任意一个步骤失败,则发送失败邮件;否则发送成功邮件。 | |
# - name: Send Mail 发送邮件 | |
# if: ${{ !cancelled() && success() }} | |
# uses: bingblue/send-nodemailer@master | |
# with: | |
# user: '${{ secrets.EMAIL_USERNAME }}' | |
# pass: '${{ secrets.EMAIL_PASSWORD }}' | |
# host: 'smtp.gmail.com' | |
# port: 465 | |
# secure: true | |
# from: '构建与部署 <maosenyang00@gmail.com>' | |
# to: 1960638223@qq.com,1694181697@qq.com | |
# subject: 'Success:部署成功!' | |
# html: '<h2>构建部署执行完毕!</h2>' | |
# - name: Send Mail 发送邮件 | |
# if: ${{ !cancelled() && failure() }} | |
# uses: bingblue/send-nodemailer@master | |
# with: | |
# user: '${{ secrets.EMAIL_USERNAME }}' | |
# pass: '${{ secrets.EMAIL_PASSWORD }}' | |
# host: 'smtp.gmail.com' | |
# port: 465 | |
# secure: true | |
# from: '构建与部署 <maosenyang00@gmail.com>' | |
# to: 1960638223@qq.com,1694181697@qq.com | |
# subject: 'Failed:部署失败' | |
# html: '<h2>部署失败请重新检查代码。</h2>' |