Skip to content

Use JamesIves/github-pages-deploy-action #58

Use JamesIves/github-pages-deploy-action

Use JamesIves/github-pages-deploy-action #58

Workflow file for this run

name: deploy
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3.5'
bundler-cache: true
- name: Install dependencies and build
run: |
npm install -g @mermaid-js/mermaid-cli
sudo apt-get update && sudo apt-get install -y imagemagick
export JEKYLL_ENV=production
bundle exec jekyll build
- name: Purge unused CSS
run: |
npm install -g purgecss
purgecss -c purgecss.config.js
- name: Deploy
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: _site