Skip to content

Commit

Permalink
ci: separate PR (build only) and Push (build and deploy)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaudinnicolas committed Jun 2, 2024
1 parent 3329255 commit 978fb23
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

name: 🦕 Build D4G Docusaurus website on Pull Request

on:
# Triggers the workflow on Pull Request events but only for the default branch
pull_request:
branches:
- master

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
name: Build Docusaurus
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20

- name: Install dependencies and build website
run: |
yarn install --frozen-lockfile
yarn build
6 changes: 4 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
name: 🦕 Build and Deploy D4G Docusaurus website to GitHub Pages

on:
# Triggers the workflow on push events but only for the default branch
push:
branches:
- master
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
name: Build Docusaurus
Expand Down

0 comments on commit 978fb23

Please sign in to comment.