name: Website on: push: branches: - main pull_request: jobs: build: runs-on: ubuntu-latest if: github.ref != 'refs/heads/main' steps: - name: 'Checkout' uses: actions/checkout@master - name: 'Content update' run: | make -C website content_update - name: 'Build only' uses: shalzz/zola-deploy-action@master env: BUILD_DIR: website BUILD_ONLY: true build_and_deploy: runs-on: ubuntu-latest if: github.ref == 'refs/heads/main' steps: - name: 'Checkout' uses: actions/checkout@master - name: 'Content update' run: | make -C website content_update - name: 'Build and deploy' uses: shalzz/zola-deploy-action@master env: PAGES_BRANCH: gh-pages BUILD_DIR: website # See https://github.com/marketplace/actions/zola-deploy-to-pages#secrets for details TOKEN: ${{ secrets.TOKEN }}