diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..33aec21 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,35 @@ +name: Build and Deploy + +on: + pull_request: + push: + branches: + - "main" + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + - run: bundle exec jekyll build + - uses: actions/upload-pages-artifact@v3 + id: upload-artifact + with: + path: "build/" + + deploy: + if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' + environment: + name: github-pages + runs-on: ubuntu-latest + needs: build + permissions: + pages: write + id-token: write + steps: + - uses: actions/deploy-pages@v4