Merge pull request #227 from SHoogland/dependabot/npm_and_yarn/cypres… #227
This file contains 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: screenshots ci actions | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
screenshots: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# get the node version from the .nvmrc file | |
- name: Read .nvmrc | |
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)" | |
id: nvm | |
# setup node based on the version from the .nvmrc file, | |
# fetched in the previous step | |
- name: Setup Node.js (.nvmrc) | |
uses: actions/setup-node@v4.0.2 | |
with: | |
node-version: "${{ steps.nvm.outputs.NVMRC }}" | |
# run the ci equivalent of npm install | |
- name: npm ci | |
run: | | |
npm ci | |
npm run dist | |
(npx http-server docs/.vuepress/dist &) | |
./node_modules/.bin/wait-on http://localhost:8080 | |
- uses: cypress-io/github-action@v6 | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: cypress-screenshots | |
path: cypress/screenshots | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: cypress-videos | |
path: cypress/videos |