Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
m00sp authored Jul 17, 2024
1 parent 81a1663 commit be141de
Showing 1 changed file with 12 additions and 30 deletions.
42 changes: 12 additions & 30 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,18 @@
name: Zola on GitHub Pages

on:
push:
branches:
- main
pull_request:

on:
push:
branches:
- main

jobs:
build:
name: Publish site
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/main'
steps:
- name: Checkout main
uses: actions/checkout@v4
- name: Build only
uses: shalzz/[email protected]
env:
BUILD_DIR: docs
BUILD_ONLY: true
BUILD_FLAGS: --drafts
# A GitHub token is not necessary when BUILD_ONLY is true
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build_and_deploy:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout main
uses: actions/checkout@v4
- name: Build and deploy
uses: shalzz/[email protected]
env:
BUILD_DIR: docs
PAGES_BRANCH: gh-pages
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout main
uses: actions/checkout@v4
- name: Build and deploy
uses: shalzz/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit be141de

Please sign in to comment.