Skip to content

Bump actions/upload-artifact from 4.6.2 to 5.0.0 #490

Bump actions/upload-artifact from 4.6.2 to 5.0.0

Bump actions/upload-artifact from 4.6.2 to 5.0.0 #490

Workflow file for this run

name: CI
on:
push:
branches-ignore:
- "dependabot/**"
tags:
- "*"
pull_request:
workflow_dispatch:
env:
FORCE_COLOR: 2
NODE: 22
RUBY: "3.4"
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: Set up Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: ${{ env.NODE }}
cache: npm
- name: Set up Ruby
uses: ruby/setup-ruby@44511735964dcb71245e7e55f72539531f7bc0eb # v1.257.0
with:
ruby-version: ${{ env.RUBY }}
bundler-cache: true
- name: Install npm dependencies
run: npm ci
- name: Run tests
run: npm test
- name: Upload docs
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
if: github.repository == 'mdo/github-buttons' && startsWith(github.ref, 'refs/tags/')
with:
name: docs
path: ./_site/
if-no-files-found: error
deploy:
runs-on: ubuntu-latest
needs: test
if: github.repository == 'mdo/github-buttons' && startsWith(github.ref, 'refs/tags/')
steps:
- name: Clone repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- name: Download docs
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
with:
name: docs
path: ./_site/
- name: Deploy
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
with:
allow_empty_commit: false
personal_token: ${{ secrets.PERSONAL_TOKEN }}
publish_branch: gh-pages
publish_dir: ./_site/