summaryrefslogtreecommitdiff
path: root/.github/workflows/build.yml
blob: 4f39d0a915d4edf0f4b83f34178a887ca61b46dc (plain)
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
name: Build Pages

on:
  push:
    branches:
      - master

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

      - name: Prepare _site
        run: |
          mkdir _site
          for item in *; do
            if [ "$item" != "_site" ] && [ "$item" != ".github" ]; then
              mv "$item" _site/
            fi
          done
          cp .github/CNAME _site/CNAME
          touch _site/.nojekyll

      - name: Deploy
        uses: peaceiris/actions-gh-pages@v4
        with:
          publish_dir: ./_site
          github_token: ${{ secrets.GITHUB_TOKEN }}