diff --git a/.github/workflows/YAML b/.github/workflows/YAML new file mode 100644 index 0000000..8b4d5ff --- /dev/null +++ b/.github/workflows/YAML @@ -0,0 +1,27 @@ +name: Build and Deploy Jekyll + +on: + push: + branches: + - main # This ensures it runs when you update your code + +jobs: + build_and_deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Build site + run: | + docker run \ + -v ${{ github.workspace }}:/srv/jekyll \ + -e JEKYLL_ENV=production \ + jekyll/builder:latest \ + /bin/bash -c "chmod -R 777 /srv/jekyll && jekyll build" + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} + publish_dir: ./_site