generated from publicodes/model-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: only deploy gh pages on push on main
- Loading branch information
1 parent
0437622
commit 0460910
Showing
2 changed files
with
37 additions
and
34 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
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Deploy GitHub Pages | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["Build rules"] | ||
branches: | ||
- main | ||
types: | ||
- completed | ||
|
||
jobs: | ||
deploy_gh_page: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.ref }} | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: "yarn" | ||
|
||
- id: install | ||
name: Install dependencies | ||
run: yarn install --immutable && yarn install --immutable --cwd doc | ||
|
||
- id: doc:build | ||
name: Build the documentation | ||
run: yarn doc:build | ||
- name: Deploy | ||
uses: crazy-max/ghaction-github-pages@v3 | ||
with: | ||
target_branch: gh-pages | ||
build_dir: doc/build | ||
jekyll: false | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |