Skip to content

build(deps): bump actions/download-artifact from 3 to 4 #1531

build(deps): bump actions/download-artifact from 3 to 4

build(deps): bump actions/download-artifact from 3 to 4 #1531

Workflow file for this run

name: CI
on:
push:
branches:
- main
- live
- "!dependabot/**"
pull_request:
workflow_dispatch:
env:
FORCE_COLOR: 2
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"
cache: npm
- name: Install npm dependencies
run: npm ci
- name: Lint
run: npm run lint
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"
cache: npm
- name: Install npm dependencies
run: npm ci
- name: Build
run: npm run build
- name: Upload build files
uses: actions/upload-artifact@v3
if: github.repository == 'jakearchibald/svgomg' && github.ref == 'refs/heads/live'
with:
name: build
path: ./build/
if-no-files-found: error
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: [lint, build]
if: github.repository == 'jakearchibald/svgomg' && github.ref == 'refs/heads/live'
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Download build files
uses: actions/download-artifact@v4
with:
name: build
path: ./build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
allow_empty_commit: false
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./build