wasmerio / docs.wasmer.io

The Wasmer Docs Website (website deployed using Wasmer Edge)
https://docs.wasmer.io/
MIT License
14 stars 7 forks source link

Make sure we run CI in PRs as well as on `main` #68

Closed Michael-F-Bryan closed 9 months ago

Michael-F-Bryan commented 9 months ago

Deploying on the main branch just failed because we had an outdated pnpm-lock.yaml file and PRs don't try to build the website before merging.

ERR_PNPM_OUTDATED_LOCKFILE  Cannot install with "frozen-lockfile" because pnpm-lock.yaml is not up to date with package.json

Note that in CI environments this setting is true by default. If you still need to run install in such cases, use "pnpm install --no-frozen-lockfile"

    Failure reason:
    specifiers in the lockfile ({"@headlessui/react":"^1.7.14","@heroicons/react":"^2.0.18","@theguild/remark-npm2yarn":"^0.3.0","next":"^13.0.6","nextra":"latest","nextra-theme-docs":"latest","react":"^18.2.0","react-dom":"^18.2.0","sharp":"^0.32.1","@types/node":"18.11.[10](https://github.com/wasmerio/docs.wasmer.io/actions/runs/7182385929/job/19558777220#step:8:11)","@typescript-eslint/eslint-plugin":"^5.59.5","@typescript-eslint/parser":"^5.59.5","autoprefixer":"^10.4.14","eslint":"^8.40.0","eslint-plugin-react":"^7.32.2","postcss":"^8.4.23","tailwindcss":"^3.3.2","typescript":"^4.9.3"}) don't match specs in package.json ({"@types/node":"18.[11](https://github.com/wasmerio/docs.wasmer.io/actions/runs/7182385929/job/19558777220#step:8:12).10","@typescript-eslint/eslint-plugin":"^5.59.5","@typescript-eslint/parser":"^5.59.5","autoprefixer":"^10.4.14","eslint":"^8.40.0","eslint-plugin-react":"^7.32.2","postcss":"^8.4.23","tailwindcss":"^3.3.2","typescript":"^4.9.3","@headlessui/react":"^1.7.14","@heroicons/react":"^2.0.18","next":"^[13](https://github.com/wasmerio/docs.wasmer.io/actions/runs/7182385929/job/19558777220#step:8:14).0.6","nextra":"latest","nextra-theme-docs":"latest","react":"^18.2.0","react-dom":"^18.2.0","sharp":"^0.32.1"})

I've altered the CI/CD workflow so we will always build the website, but only do the actual deployment when pushing to main. That should catch these sorts of bugs in the future.