Add automatic PR validation workflow integrated with Zola deployment #1
This file contains hidden or 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
name: Validate PR Build | |
on: | |
pull_request: | |
branches: ["main"] | |
permissions: | |
contents: read | |
jobs: | |
validate-build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout PR | |
uses: actions/checkout@v4 | |
with: | |
path: website | |
- name: Checkout valkey-doc | |
uses: actions/checkout@v4 | |
with: | |
repository: valkey-io/valkey-doc | |
path: valkey-doc | |
- name: Checkout valkey | |
uses: actions/checkout@v4 | |
with: | |
repository: valkey-io/valkey | |
path: valkey | |
- name: Checkout valkey-bloom | |
uses: actions/checkout@v4 | |
with: | |
repository: valkey-io/valkey-bloom | |
path: valkey-bloom | |
- name: Checkout valkey-search | |
uses: actions/checkout@v4 | |
with: | |
repository: valkey-io/valkey-search | |
path: valkey-search | |
- name: Checkout valkey-json | |
uses: actions/checkout@v4 | |
with: | |
repository: valkey-io/valkey-json | |
path: valkey-json | |
- name: Init commands, topics and clients | |
run: | | |
cd website | |
./build/init-topics-and-clients.sh ../valkey-doc/topics ../valkey-doc/clients | |
./build/init-commands.sh ../valkey-doc/commands ../valkey/src/commands ../valkey-bloom/src/commands ../valkey-json/src/commands ../valkey-search/src/commands | |
- name: Build and validate | |
uses: shalzz/[email protected] | |
env: | |
BUILD_DIR: website | |
BUILD_ONLY: true | |
BUILD_THEMES: false |