github.com/ipfans/trojan-go@v0.11.0/.github/workflows/gh-pages.yml (about)

     1  on:
     2    push:
     3      branches:
     4        - master
     5      paths:
     6        - "docs/**"
     7        - ".github/workflows/gh-pages.yml"
     8    pull_request:
     9      types: [opened, synchronize, reopened]
    10      branches:
    11        - master
    12      paths:
    13        - "docs/**"
    14        - ".github/workflows/gh-pages.yml"
    15  name: github-pages
    16  jobs:
    17    deploy:
    18      runs-on: ubuntu-latest
    19      steps:
    20        - uses: actions/checkout@v2
    21          with:
    22            submodules: true  # Fetch Hugo themes
    23            fetch-depth: 0    # Fetch all history for .GitInfo and .Lastmod
    24  
    25        - name: Setup Hugo
    26          uses: peaceiris/actions-hugo@v2
    27          with:
    28            hugo-version: "0.83.1"
    29            # extended: true
    30  
    31        - name: Build
    32          run: |
    33            cd docs
    34            make hugo-themes
    35            hugo
    36  
    37        - name: Deploy
    38          if: ${{ github.event_name == 'push' }}
    39          uses: peaceiris/actions-gh-pages@v3
    40          with:
    41            github_token: ${{ secrets.GITHUB_TOKEN }}
    42            publish_dir: ./docs/public