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

make www-data user run npm run build #1

Open
alifeee opened this issue Jun 20, 2024 · 0 comments
Open

make www-data user run npm run build #1

alifeee opened this issue Jun 20, 2024 · 0 comments

Comments

@alifeee
Copy link
Owner

alifeee commented Jun 20, 2024

currently, the edit script which fires on form submission just replaces the json file in _site with the new one. It should really run npm run build, so things like the RSS feed can be built.

By default, npm does not exist. My user alifeee has access to it via nvm. But, www-data user does not have a home folder, and does not have nvm installed.

I would either

  • create a home folder for www-data, install nvm (like for etherpad
  • install a version of nvm globally

Then, use

bash .../.nvm/nvm.sh
nvm use 20

in the script somewhere to activate npm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant