-
-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Improve workflows with permissions and fences highlight * Remove permissions:
- Loading branch information
1 parent
9603043
commit 4abce24
Showing
1 changed file
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | ||
|
@@ -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' | ||
|