Skip to content

Fix paths and working directory in GitHub Actions #2

Fix paths and working directory in GitHub Actions

Fix paths and working directory in GitHub Actions #2

Workflow file for this run

name: Build and deploy Jekyll site to Pages
on:
push:
branches: [ main ] # or your default branch
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true
working-directory: jekyll-site
- name: Install dependencies
working-directory: jekyll-site
run: bundle install
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
# IMPORTANT: paths are relative to repo root
source: ./jekyll-site
destination: ./_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./_site
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write
id-token: write
steps:
- id: deployment
uses: actions/deploy-pages@v4