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

Github actions failing to install dependencies #45

Open
oliveris opened this issue Mar 14, 2022 · 0 comments
Open

Github actions failing to install dependencies #45

oliveris opened this issue Mar 14, 2022 · 0 comments

Comments

@oliveris
Copy link

Using nvm I downgraded my node version to 10 then ran yarn and it installed successfully.

To make this work on Github actions I had to add the following to the deploy.yml.

      - name: Use Node.js
        uses: actions/setup-node@v1
        with:
          node-version: '10.x'

This adds an extra step to use this particular version of Node.

The below shows the fully updated deploy.yml file.

name: Deploy

on: [workflow_dispatch]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Git Checkout
        uses: actions/checkout@v2
          
      - name: Use Node.js
        uses: actions/setup-node@v1
        with:
          node-version: '10.x'

      - name: Yarn Cache
        uses: c-hive/gha-yarn-cache@v1

      - name: Install dependencies
        run: yarn

      - name: Build React App
        run: yarn build
        env:
          HTTPS: "true"
          REACT_APP_BASE_URL: ${{ secrets.REACT_APP_BASE_URL }}
          PUBLIC_URL: ${{ secrets.PUBLIC_URL }}

      - name: Deploy to GitHub Pages
        uses: peaceiris/actions-gh-pages@v3
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./build
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