Skip to content

Commit 010975a

Browse files
chore(docs): bugfix + deploy on master (#13717)
# Automatically release docs on master branch This PR adds automatic documentation release when changes are merged to the master branch. It: - Updates the main bootstrap.sh to call release-docs when on the master branch - Renames the docs release command from "release" to "release-docs" to avoid it running on releases (we don't need it) - Passes CI parameter to project bootstrap scripts in the release workflow to avoid the yarn lock problem - Removes stderr redirection in docs deployment so we can see the output of the release in the logs - Removes the deploy-doc github-action since that will be dealt with on the `ci` The changes ensure our documentation is automatically deployed whenever changes are merged to master, improving our documentation workflow. --------- Co-authored-by: Maddiaa <[email protected]>
1 parent 9c4345a commit 010975a

File tree

4 files changed

+9
-33
lines changed

4 files changed

+9
-33
lines changed

.github/workflows/docs-deploy.yml renamed to .github/workflows/docs-typesense.yml

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Docs Deploy
1+
name: Docs Scraper
22

33
on:
44
workflow_dispatch:
@@ -9,7 +9,7 @@ on:
99
- docs/**
1010

1111
jobs:
12-
docs-pr:
12+
docs-scraper:
1313
runs-on: ubuntu-latest
1414
env:
1515
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
@@ -23,30 +23,6 @@ jobs:
2323
with:
2424
fetch-depth: 0
2525

26-
- name: Set up Node.js
27-
uses: actions/setup-node@v3
28-
with:
29-
node-version: "18"
30-
31-
- name: Enable Corepack
32-
run: corepack enable
33-
34-
- name: Configure Git
35-
run: |
36-
git config --global user.name AztecBot
37-
git config --global user.email [email protected]
38-
39-
- name: Build dependencies
40-
run: |
41-
for project in noir barretenberg l1-contracts yarn-project; do
42-
$project/bootstrap.sh
43-
done
44-
45-
# Making the bash script here so we don't accidentally deploy
46-
- name: Deploy docs
47-
run: |
48-
./docs/bootstrap.sh release
49-
5026
- name: Reindex with Typesense docsearch-scraper
5127
run: |
5228
docker run \

.github/workflows/release-please.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
- name: Build dependencies
5555
run: |
5656
for project in noir barretenberg l1-contracts yarn-project; do
57-
$project/bootstrap.sh
57+
CI=1 $project/bootstrap.sh
5858
done
5959
6060
- name: Query new version

bootstrap.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,10 @@ case "$cmd" in
341341
echo_stderr -e "${yellow}Not testing or benching $REF_NAME because it is a release tag.${reset}"
342342
fi
343343
fi
344+
345+
if [ "$REF_NAME" = "master" ]; then
346+
docs/bootstrap.sh release-docs
347+
fi
344348
;;
345349
test|test_cmds|bench|release|release_dryrun)
346350
$cmd "$@"

docs/bootstrap.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,7 @@ function release_docs {
3737
yarn install
3838
yarn build
3939

40-
if ! deploy_output=$(yarn netlify deploy --site aztec-docs-dev --prod 2>&1); then
41-
echo "Netlify deploy failed with error:"
42-
echo "$deploy_output"
43-
exit 1
44-
fi
40+
yarn netlify deploy --site aztec-docs-dev --prod 2>&1
4541
}
4642

4743
case "$cmd" in
@@ -54,7 +50,7 @@ case "$cmd" in
5450
"hash")
5551
echo "$hash"
5652
;;
57-
"release")
53+
"release-docs")
5854
release_docs
5955
;;
6056
*)

0 commit comments

Comments
 (0)