feat(actions): Added GitHub Action for automated workflow #4
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: CI | |
on: | |
push: | |
branches: | |
- main | |
env: | |
GIT_USER: shumxin | |
GIT_EMAIL: shumxin@outlook.com | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node_version: [14.x] | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node_version }} | |
uses: actions/setup-node@v1 | |
with: | |
version: ${{ matrix.node_version }} | |
- name: Setup hexo | |
env: | |
HEXO_DEPLOY_PRI: ${{ secrets.HEXO_DEPLOY_PRI }} | |
run: | | |
git config --global user.name $GIT_USER | |
git config --global user.email $GIT_EMAIL | |
npm install hexo-cli -g | |
npm install | |
- name: Hexo deploy | |
run: | | |
hexo clean | |
hexo d |