fix: fix social.ejs undefined issue & update deploy workflow #25
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: deploy | |
on: | |
push: | |
branches: | |
- master | |
- demo-source | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@master | |
with: | |
ref: demo-source | |
- name: Use Node.js | |
uses: actions/setup-node@master | |
with: | |
node-version: '18.x' | |
- name: Prepare source | |
run: | | |
npm install hexo-renderer-ejs hexo-renderer-dartsass --save | |
git clone -b master https://github.com/ahonn/hexo-theme-even.git themes/even | |
cp themes/even/_config.yml.example themes/even/_config.yml | |
npm install | |
- name: Run hexo generate | |
run: | | |
npm i -g hexo-cli | |
hexo generate | |
- name: Run hexo deploy | |
env: | |
GH_DEPLOY_TOKEN: ${{secrets.GH_DEPLOY_TOKEN}} | |
run: | | |
git config --global user.name 'ahonn' | |
git config --global user.email '[email protected]' | |
sed -i "s/<token>/${GH_DEPLOY_TOKEN}/g" ./_config.yml | |
hexo deploy |