hugo部署到虚拟主机
之前的hugo部署在github上,但是GitHub一直也不稳定,有时能上有时上不了。 这两天找到一个免费虚拟主机,也没有什么网站可以搭建,就想着把hugo同步到虚拟主机里。 然后今天就实现了。 就是利用gith的workflows,把生成的静态页面推送到虚拟主机。 name: Deploy Hugo on: push: branches: - master # master 更新触发 jobs: build-deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 # 添加 Node.js 版本设置步骤 - name: Setup Node.js uses: actions/setup-node@v4 # 官方 Node.js 环境配置 Action with: node-version: '18.x' # 指定需要的 Node.js 版本(例如 16.x、18.x、20.x 等) - name: Setup Hugo uses: peaceiris/actions-hugo@v2 with: hugo-version: '0.88.0' - name: Build run: hugo - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v3 with: personal_token: ${{ secrets....