Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

chore(deps): update github artifact actions to v4 #633

chore(deps): update github artifact actions to v4

chore(deps): update github artifact actions to v4 #633

Workflow file for this run

name: CI & CD
on:
push:
branches-ignore: [gh-pages]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
run: npm ci
- name: Build pages
run: npm run build
- name: Upload decks
uses: actions/upload-artifact@v4
with:
name: ausguck
path: public
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
run: npm ci
- name: Run Cypress
run: npm run test:e2e:ci
- uses: actions/upload-artifact@v4
if: failure()
with:
name: chrome-cypress-screenshots
path: cypress/screenshots
# Test run video was always captured, so this action uses "always()" condition
- uses: actions/upload-artifact@v4
if: always()
with:
name: chrome-cypress-videos
path: cypress/videos
deploy:
runs-on: ubuntu-latest
needs: [build, test]
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Download decks from previous step
uses: actions/download-artifact@v4
with:
name: ausguck
path: ausguck
- name: Deploy to gh pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./ausguck