Skip to content

Commit

Permalink
chore: creating a workflow for the release trigger (#3455)
Browse files Browse the repository at this point in the history
Co-authored-by: Savio <[email protected]>
  • Loading branch information
signorecello and Savio-Sou authored Nov 7, 2023
1 parent 1236610 commit 5a8f88f
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish Docs
name: Cut a new version of the docs

on:
workflow_dispatch:
Expand Down Expand Up @@ -90,7 +90,6 @@ jobs:
--body "Updates documentation to new version for tag ${{ github.event.inputs.tag }}." \
--base master \
--head new-docs-version-${{ github.event.inputs.tag }} \
--label documentation
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build docs
name: Deploy preview for PR

on:
pull_request:
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:
})
}
build_and_deploy:
build_and_deploy_preview:
runs-on: ubuntu-latest
permissions:
pull-requests: write
Expand Down
71 changes: 71 additions & 0 deletions .github/workflows/docs-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Rebuild docs with the latest release

on:
release:
types: [released]

jobs:
build_and_deploy:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '18'

- name: Install wasm-bindgen-cli
uses: taiki-e/install-action@v2
with:
tool: [email protected]

- name: Install wasm-opt
run: |
npm i wasm-opt -g
- name: Install dependencies
run: yarn

- name: Build acvm_js
run: yarn workspace @noir-lang/acvm_js build

- name: Build noirc_abi
run: yarn workspace @noir-lang/noirc_abi build

- name: Build noir_js_types
run: yarn workspace @noir-lang/types build

- name: Build barretenberg wrapper
run: yarn workspace @noir-lang/backend_barretenberg build

- name: Run noir_js
run: |
yarn workspace @noir-lang/noir_js build
- name: Build docs
run:
yarn workspace docs build

- name: Remove pre-releases
working-directory: docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn setStable

- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
publish-dir: './docs/build'
production-branch: master
production-deploy: true
github-token: ${{ secrets.GITHUB_TOKEN }}
enable-github-deployment: false
deploy-message: "Deploy from GitHub Actions for release"
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
- name: Dispatch to publish workflow
uses: benc-uk/workflow-dispatch@v1
with:
workflow: publish-docs.yml
workflow: docs-new-version.yml
repo: noir-lang/noir
ref: master
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 5a8f88f

Please sign in to comment.