Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(docs): docs workflow fix #3458

Merged
merged 2 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/docs-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,16 @@ jobs:
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: Build docs
run:
yarn workspace docs build

- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/docs-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ jobs:
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: Build docs
run:
yarn workspace docs build

- name: Deploy to Netlify
uses: nwtgck/[email protected]
Expand Down
5 changes: 3 additions & 2 deletions docs/scripts/setStable.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const axios = require('axios');
const { release } = require('os');

const IGNORE_VERSIONS = ['0.16.0'];
const NUMBER_OF_VERSIONS_TO_SHOW = 2;
const NUMBER_OF_VERSIONS_TO_SHOW = 4;

async function main() {
const versionsFile = path.join(__dirname, '../versions.json');
Expand All @@ -31,10 +31,11 @@ async function main() {
const stables = data
.filter((release) => !release.prerelease && !release.tag_name.includes('aztec'))
.filter((release) => !IGNORE_VERSIONS.includes(release.tag_name.replace('v', '')))
.map((release) => release.tag_name.replace('v', ''))
.map((release) => release.tag_name)
.slice(0, NUMBER_OF_VERSIONS_TO_SHOW);

console.log('Stables: ', stables);

fs.writeFileSync(versionsFile, JSON.stringify(stables, null, 2));
}

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/versions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[
"0.17.0",
"0.10.5"
]
]
Loading