chore(deps): bump semver from 5.7.1 to 5.7.2 #43
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 Theme Demo | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: | |
- 13.x | |
steps: | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: npm set audit false && node -v && npm -v | |
- name: Clone hexojs/hexo-theme-unit-test | |
run: git clone https://github.com/hexojs/hexo-theme-unit-test . | |
- name: Clone renbaoshuo/hexo-theme-pure | |
run: git clone https://github.com/renbaoshuo/hexo-theme-pure.git themes/pure | |
- run: npm i hexo-cli -g | |
- run: npm i | |
- run: npm i hexo-renderer-less | |
- name: Add Friends Page | |
run: | | |
mkdir -p source/friends && touch source/friends/index.md | |
echo -e "---\nlayout: friends\ntitle: 友情链接\n---\n\n请前往 [renbaoshuo/Friends](https://github.com/renbaoshuo/Friends) 申请友链。\n" > source/friends/index.md | |
cat source/friends/index.md | |
- name: Add Tags Page | |
run: | | |
mkdir -p source/tags && touch source/tags/index.md | |
echo -e "---\nlayout: tags\ntitle: 标签\n---\n" > source/tags/index.md | |
cat source/tags/index.md | |
- name: Site Config | |
run: rm _config.yml && cp themes/pure/_config.example.yml _config.yml | |
- name: Generate Site Files | |
run: hexo g | |
- name: Deploy | |
if: ${{ github.event_name != 'pull_request' }} | |
uses: peaceiris/actions-gh-pages@v2 | |
env: | |
PERSONAL_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
PUBLISH_BRANCH: gh-pages | |
PUBLISH_DIR: ./public | |
with: | |
username: ${{ secrets.GIT_USERNAME }} | |
useremail: ${{ secrets.GIT_EMAIL }} |