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
| name: HEXO_DEPLOY | |
| on: | |
| push: | |
| branches: | |
| - HEXO | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@v1 | |
| with: | |
| ref: master | |
| - name: Use Node.js ${{ matrix.node_version }} | |
| uses: actions/setup-node@v1 | |
| with: | |
| version: ${{ matrix.node_version }} | |
| - name: Setup hexo | |
| env: | |
| ACTION_DEPLOY_KEY: ${{ secrets.HEXO_DEPLOY_SECRET }} | |
| run: | | |
| mkdir -p ~/.ssh/ | |
| echo "$ACTION_DEPLOY_KEY" > ~/.ssh/id_rsa | |
| chmod 600 ~/.ssh/id_rsa | |
| ssh-keyscan github.com >> ~/.ssh/known_hosts | |
| git config --global user.email "george674834080@gmail.com" | |
| git config --global user.name "im_wower" | |
| npm install hexo-cli -g | |
| npm install | |
| - name: Hexo deploy | |
| run: | | |
| hexo clean | |
| hexo d |