Add comprehensive README with blog workflow documentation #27
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: Deploy to GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - source # Trigger on changes to the source branch | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout source code | |
| uses: actions/checkout@v2 | |
| with: | |
| ref: source # Check out the source branch | |
| - name: Setup Hugo | |
| uses: peaceiris/actions-hugo@v2 | |
| with: | |
| hugo-version: 'latest' | |
| - name: Build site | |
| run: hugo --minify | |
| - name: Create .nojekyll file | |
| run: touch ./public/.nojekyll | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| personal_token: ${{ secrets.PERSONAL_TOKEN }} | |
| publish_dir: ./public | |
| publish_branch: main # Deploy built files to main branch | |
| allow_deploy_from_same_branch: true |