Skip to content

Commit

Permalink
chore(docs): docs workflow fix (#3458)
Browse files Browse the repository at this point in the history
  • Loading branch information
signorecello authored and TomAFrench committed Nov 14, 2023
1 parent 0a19570 commit 54541d7
Show file tree
Hide file tree
Showing 224 changed files with 12 additions and 11 deletions.
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.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"0.19.2",
"0.17.0",
"0.10.5"
]
]

0 comments on commit 54541d7

Please sign in to comment.