new-post #47
This file contains hidden or 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: Build and Deploy Hugo Blog | |
| on: | |
| repository_dispatch: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout blog repo | |
| uses: actions/checkout@v3 | |
| - name: Checkout article repo to content/posts | |
| uses: actions/checkout@v3 | |
| with: | |
| repository: eRain03/MinePosts | |
| path: content/ | |
| token: ${{ secrets.PERSONAL_TOKEN }} | |
| - name: Setup Hugo | |
| uses: peaceiris/actions-hugo@v2 | |
| with: | |
| hugo-version: '0.120.4' | |
| extended: true | |
| - name: Build Hugo | |
| run: hugo --minify | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.PAT_TOKEN }} | |
| publish_dir: ./public | |
| cname: erain.xin | |