on: push: branches: -main# Set a branch to deploy pull_request:
jobs: deploy: runs-on:ubuntu-20.04 concurrency: group:${{github.workflow}}-${{github.ref}} steps: -uses:actions/checkout@v3 with: submodules:true# Fetch Hugo themes (true OR recursive) fetch-depth:0# Fetch all history for .GitInfo and .Lastmod
# Caching dependencies to speed up workflows. (GitHub will remove any cache entries that have not been accessed in over 7 days.) -name:Cachenodemodules uses:actions/cache@v1 id:cache with: path:node_modules key:${{runner.os}}-node-${{hashFiles('**/package-lock.json')}} restore-keys:| ${{ runner.os }}-node- -name:InstallDependencies if:steps.cache.outputs.cache-hit!='true' run:npmci
# Deploy hexo blog website. -name:Deploy id:deploy uses:sma11black/hexo-action@v1.0.3 with: deploy_key:${{secrets.ACTIONS_DEPLOY_KEY}} user_name:yourgithubusername# (or delete this input setting to use bot account) user_email:yourgithubuseremail# (or delete this input setting to use bot account) commit_msg:${{github.event.head_commit.message}}# (or delete this input setting to use hexo default settings) # Use the output from the `deploy` step(use for test action) -name:Gettheoutput run:| echo"${{ steps.deploy.outputs.notify }}"