jobs: build: runs-on:ubuntu-latest name:Ajobtodeployblog. steps: -name:Checkout uses:actions/[email protected] with: submodules:true# Checkout private submodules(themes or something else). # 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/[email protected] 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/[email protected] with: deploy_key:${{secrets.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 }}"
jobs: build: runs-on:ubuntu-latest name:Ajobtodeployblog. steps: -name:Checkout uses:actions/[email protected] with: submodules:true# Checkout private submodules(themes or something else). # 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/[email protected] 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
############################################ -name:Downloaddoc run:wgethttps://docs.google.com/presentation/d/xxxxxx/export/pdf -name:Moveandrenamefile run:mvpdfpublic/anynameyouwant.pdf ############################################ # Deploy hexo blog website. -name:Deploy id:deploy uses:sma11black/[email protected] with: deploy_key:${{secrets.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 }}"
這樣一來就也可以自己手動觸發更新流程了! 整合上去之後,就可以在手機上改一改 網路上的 PDF 就一起更新囉!
PS: 我原先在部落格用一個頁面轉址到 PDF 網址 但是這方法感覺不太穩,希望有大神指點迷津 QvQ