diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index d4f37f3..8f7450b 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -2,9 +2,9 @@ name: Website CI on: push: - branches: [ main ] + branches: main pull_request: - branches: [ main ] + branches: main jobs: @@ -13,6 +13,14 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Build the website - run: docker-compose run --rm middleman bundle exec middleman build + - uses: actions/checkout@v3 + + - name: Build the website + run: docker-compose run --rm middleman bundle exec middleman build + + - name: Deploy the website + if: github.event_name == 'push' + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./build