Skip to content

Commit

Permalink
Discover yarn version automatically (#323)
Browse files Browse the repository at this point in the history
Github actions does not use the right version of yarn. This also ensures developers are using the same yarn version.
  • Loading branch information
joshklop committed Aug 5, 2022
1 parent e7d92c8 commit 4430423
Show file tree
Hide file tree
Showing 5 changed files with 788 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docs-prod-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Test Build
run: |
cd docs
corepack enable
corepack enable yarn
yarn install --immutable
yarn build
gh-release:
Expand Down Expand Up @@ -47,6 +47,6 @@ jobs:
git config --global user.name "gh-actions"
cd docs
cp .env.template .env
corepack enable
corepack enable yarn
yarn install --immutable
yarn deploy
783 changes: 783 additions & 0 deletions docs/.yarn/releases/yarn-3.2.2.cjs

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
nodeLinker: node-modules
yarnPath: .yarn/releases/yarn-3.2.2.cjs
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ Then go to Juno's `docs` directory and run the command below:
nvm use
```

This will inspect the `docs/.nvmrc` file and switch to the correct node version (and install it if necessary).
This will inspect the `docs/.nvmrc` file and switch to the correct node version (you may need to install it with `nvm install <version>`).

Now install [yarn](https://yarnpkg.com/getting-started/install):

```shell
corepack enable
corepack enable yarn
```

...and the project dependencies:
Expand Down
3 changes: 0 additions & 3 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
"name": "juno-docs",
"version": "0.0.0",
"private": true,
"engines": {
"yarn": ">=3.2.2"
},
"scripts": {
"docusaurus": "docusaurus",
"setup-cname": "node ./scripts/setup-cname.js",
Expand Down

0 comments on commit 4430423

Please sign in to comment.