Skip to content

Add retry logic for yarn install to handle registry errors #2

Add retry logic for yarn install to handle registry errors

Add retry logic for yarn install to handle registry errors #2

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches: [ master ]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Cache dependencies
uses: actions/cache@v4
with:
path: |
node_modules
example/node_modules
~/.cache/yarn
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: |
yarn install --frozen-lockfile --network-timeout 300000 || \
yarn install --network-timeout 300000 || \
npm ci
- name: Build website
run: yarn build
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './public'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4