Skip to content

Commit

Permalink
And fences highlight (#88)
Browse files Browse the repository at this point in the history
* Improve workflows with permissions and fences highlight

* Remove permissions:
  • Loading branch information
williamdes authored Sep 8, 2024
1 parent 9603043 commit 4abce24
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ In your repository **Settings > Actions > General**, in Workflow permissions, ma

This example will build and deploy to gh-pages on push to the main branch.

```
```yml
name: Zola on GitHub Pages

on:
Expand All @@ -41,31 +41,31 @@ jobs:
This example will build and deploy to gh-pages branch on a push to the main branch,
and it will build only on pull requests.
```
```yml
name: Zola on GitHub Pages

on:
push:
branches:
- main
- main
pull_request:

jobs:
build:
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/main'
steps:
- name: Checkout main
uses: actions/checkout@v4
- name: Build only
- 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'
Expand Down

0 comments on commit 4abce24

Please sign in to comment.