新增程序流程图章节,添加McCabe复杂度和测试内容;新增相关图片以增强可读性 #52
This file contains hidden or 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
| # workflow name | |
| name: Hexo Blog CI(git) | |
| # master branch on push, auto run | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # check it to your workflow can access it | |
| # from: https://github.com/actions/checkout | |
| - name: Checkout Repository master branch | |
| uses: actions/checkout@master | |
| # from: https://github.com/actions/setup-node | |
| - name: Setup Node.js 12.x | |
| uses: actions/setup-node@master | |
| with: | |
| node-version: "12.x" | |
| - name: Setup Hexo Dependencies | |
| run: | | |
| npm install hexo-cli -g | |
| npm install | |
| - name: Setup Deploy Private Key | |
| env: | |
| HEXO_DEPLOY_PRIVATE_KEY: ${{ secrets.HEXO_DEPLOY_PRIVATE_KEY }} | |
| run: | | |
| mkdir -p ~/.ssh/ | |
| echo "$HEXO_DEPLOY_PRIVATE_KEY" > ~/.ssh/id_rsa | |
| chmod 600 ~/.ssh/id_rsa | |
| ssh-keyscan github.com >> ~/.ssh/known_hosts | |
| - name: Setup Git Infomation | |
| env: | |
| GIT_USER_NAME: ${{ secrets.GIT_USER_NAME }} | |
| GIT_USER_EMAIL: ${{ secrets.GIT_USER_EMAIL }} | |
| run: | | |
| git config --global user.name '$GIT_USER_NAME' | |
| git config --global user.email '$GIT_USER_EMAIL' | |
| - name: switch deploy | |
| run: | | |
| chmod a+x ./switch.sh | |
| ./switch.sh --git | |
| - name: Setup Gitalk | |
| env: | |
| COMMENT_CLIENT_ID: ${{ secrets.COMMENT_CLIENT_ID }} | |
| COMMENT_CLIENT_SECRET: ${{ secrets.COMMENT_CLIENT_SECRET }} | |
| run: | | |
| sed -i 's/COMMENT_CLIENT_ID/'$COMMENT_CLIENT_ID'/g' ./_config.icarus.yml | |
| sed -i 's/COMMENT_CLIENT_SECRET/'$COMMENT_CLIENT_SECRET'/g' ./_config.icarus.yml | |
| - name: Deploy Hexo | |
| run: | | |
| hexo clean | |
| hexo generate | |
| hexo deploy |