Skip to content

Bump peaceiris/actions-gh-pages from 3 to 4 #457

Bump peaceiris/actions-gh-pages from 3 to 4

Bump peaceiris/actions-gh-pages from 3 to 4 #457

Workflow file for this run

name: CI
on:
push:
branches-ignore:
- "dependabot/**"
tags:
- "*"
pull_request:
workflow_dispatch:
env:
FORCE_COLOR: 2
NODE: 20
RUBY: "3.2"
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE }}
cache: npm
- name: Set up Ruby
uses: ruby/setup-ruby@v1
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@v4
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@v4
with:
persist-credentials: false
- name: Download docs
uses: actions/download-artifact@v4
with:
name: docs
path: ./_site/
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
allow_empty_commit: false
personal_token: ${{ secrets.PERSONAL_TOKEN }}
publish_branch: gh-pages
publish_dir: ./_site/