name: catzilla_githubio run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 on: [push] jobs: build: runs-on: ubuntu-latest steps: - name: Cache node modules uses: actions/cache@v3 with: path: | ~/.npm **/node_modules key: ${{runner.os}}v1-npm-deps-${{ hashFiles('**/package-lock.json') }} restore-keys: ${{runner.os}}v1-npm-deps- - name: Use Node.js uses: actions/checkout@v3 with: node-version: '14.x' - run: npm install -g hexo-cli - run: git clone https://github.com/shixiaohu2206/hexo-theme-huhu.git themes/hexo-theme-huhu - run: npm install - run: npm install cheerio@=1.0.0-rc.3 - run: sed -i'' "s~landscape~hexo-theme-huhu/~" _config.yml - run: hexo clean - run: hexo generate - run: find -maxdepth 7 -mindepth 2 -name 'index.html' -exec sed -i'' "s~/cdn.jsdelivr.net/gh/catzillaorz/imgcdn/vsc_img/avatar2020-05-03.JPG~/cdn.jsdelivr.net/gh/catzillaorz/imgcdn/vsc_img/avatar2020-05-03.JPG~" {} + - run: find -maxdepth 7 -mindepth 2 -name 'index.html' -exec sed -i'' "s/raw.githubusercontent.com\/CatzillaOrz\/imgcdn\/master\//cdn.jsdelivr.net\/gh\/catzillaorz\/imgcdn\//g" {} +
- run: git config --global user.name "catzillaorz" - run: git config --global user.email "catzillaorz@outlook.com" - run: sed -i'' "s~git@github.com:~https://${{vars.GITIO_REPO_TOKEN}}@github.com/~" _config.yml - run: hexo deploy > /dev/null # 通过 Hexo 的 deploy 命令部署博客
|