about summary refs log tree commit diff
path: root/.github/workflows/hugo.yml
blob: 7a272ec5cecc49eefe5411febad7588fd96f95ae (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Hugo build

on:
  push:
    branches: [ master ]
    pull_request:
      branches: [ master ]

    workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - name: Build webring
        run: |
          git clone https://git.sr.ht/~sircmpwn/openring
          cd openring
          go build -o openring
          sudo cp openring /usr/local/bin/
          cd ..
          ./create-webring.sh

      - name: Reconfig
        run: sed -i "s/huyngo.srht.site/huy-ngo.github.io/" config.toml

      - name: Hugo Build
        uses: jakejarvis/hugo-build-action@v0.82.0

      - name: Deploy 🚀
        uses: JamesIves/github-pages-deploy-action@4.1.1
        with:
          branch: gh-pages # The branch the action should deploy to.
          folder: public # The folder the action should deploy.