diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..d787a0c --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,16 @@ +name: Deploy +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - name: Build and deploy + uses: shalzz/zola-deploy-action@v0.21.0 + env: + PAGES_BRANCH: gh-pages + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index a1291f0..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,26 +0,0 @@ -on: push -name: Zola build -jobs: - build: - runs-on: ubuntu-latest - if: github.ref != 'refs/heads/main' - steps: - - name: Checkout main - uses: actions/checkout@v3.3.0 - - name: Build - uses: shalzz/zola-deploy-action@v0.17.1 - env: - BUILD_ONLY: true - BUILD_FLAGS: --drafts - - build_and_deploy: - runs-on: ubuntu-latest - if: github.ref == 'refs/heads/main' - steps: - - name: Checkout main - uses: actions/checkout@v3.3.0 - - name: Build and deploy - uses: shalzz/zola-deploy-action@v0.17.1 - env: - PAGES_BRANCH: gh-pages - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..bc788ea --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,13 @@ +name: Build +on: pull_request + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - name: Build + uses: shalzz/zola-deploy-action@v0.21.0 + env: + BUILD_ONLY: true + BUILD_FLAGS: --drafts