diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..e377cc29 --- /dev/null +++ b/.github/workflows/build.yml @@ -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 + diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 590b996a..cef99086 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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