DEV Community

Discussion on: Deploy to Github Pages like a pro with Github Actions

Collapse
 
chapkovski profile image
Philipp Chapkovski

Small note for those who use yarn (like me) and not npm. You will get
npm ERR! cipm can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync.
because obviously package-lock.json doesn't exist. You either need to create package-lock by npm install or change a bit last lines of gh-pages-deploy.yml to

      - name: Clean install dependencies
        run: yarn install --frozen-lockfile

      - name: Run deploy script
        run: |
          git config user.name "Your username" && git config user.email "your email"
          yarn run gh-pages-deploy
Collapse
 
the_one profile image
Roland Doda

Thank you Philipp.