Skip to content

Workflow file for this run

name: Build and Deploy Jekyll site to GitHub Pages
# Controls when the action will run.
on:
# Triggers the workflow on push request events for the master branch only
push:
branches: [ master ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "github-pages"
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Build
uses: actions/jekyll-build-pages@v1
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
deploy:
# The type of runner that the job will run on
runs-on: ubuntu-latest
needs: build
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: setup
uses: actions/checkout@v3
# Downloads Node.js & install packages
- name: setup node
uses: actions/setup-node@v2
with:
node-version: 18
- run: npm ci
# Generates service worker
- name: generate sw
run: npx workbox generateSW workbox-config.js
# Deploys static files to Github Pages
- name: deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_site
publish_branch: gh-pages