switch to yarn #263
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and test workflow | |
| on: | |
| - push | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Install dependencies | |
| run: | | |
| corepack enable | |
| yarn install --immutable | |
| - name: Install hugo | |
| run: | | |
| export HUGO_VERSION=0.134.2 | |
| curl -fSL -o hugo.deb "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb" | |
| sudo dpkg -i hugo.deb | |
| - name: Install Ruby and the gems | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: 3.0.3 | |
| bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
| - name: Generate website | |
| run: yarn run build:prod | |
| - name: Run HTMLProofer | |
| run: | |
| bundle exec htmlproofer public/ | |
| --allow-missing-href true | |
| --checks Links,Images,Scripts,Favicon,OpenGraph | |
| --disable-external true | |
| --enforce-https false | |
| --ignore-empty-mailto true | |
| - name: End-2-end tests | |
| run: | | |
| yarn run start:e2e & | |
| yarn run cy:ci |