From e09cd1735430eb1b16ffff828bf71e020b05de06 Mon Sep 17 00:00:00 2001 From: Jess Bees <hi@toomanybees.com> Date: Wed, 3 May 2023 12:46:35 -0400 Subject: [PATCH 1/4] Update README.md to include usage Adds examples to the `usage` section of the README --- README.md | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 62 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7a0973d..db91682 100644 --- a/README.md +++ b/README.md @@ -2,15 +2,73 @@ A simple GitHub Action for producing Jekyll build artifacts compatible with GitHub Pages. -# Scope +## Scope This is used along with [`actions/deploy-pages`](https://github.com/actions/deploy-pages) as part of the official support for building Pages with Actions (currently in public beta for public repositories). -# Usage +## Usage -See [action.yml](action.yml) +A basic workflow with the `jekyll-build-pages` action looks like this. -# Release instructions +```yaml +name: Build Jekyll site +on: + push: + branches: ["main"] +permissions: + contents: read + pages: write + id-token: write +jobs: + 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: + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} +``` + +To write to a different destination directory, match the inputs of both the `jekyll-build-pages` and `upload-pages-artifact` actions. + +```yaml +steps: + - name: Build + uses: actions/jekyll-build-pages@v1 + with: + destination: "./output" + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + path: "./output" +``` + +### Action inputs + +| Input | Default | Description | +|-------|---------|-------------| +| `source` | `./` | The directory to build from | +| `destination` | `./_site` | The directory to write output into<br>(this should match the `path` input of the `actions/upload-pages-artifact` action) | +| `future` | `false` | If `true`, writes content dated in the future | +| `build_revision` | `$GITHUB_SHA` | The SHA-1 of the Git commit for which the build is running | +| `verbose` | `false` | If `true`, prints verbose output in logs | +| `token` | `$GITHUB_TOKEN` | The GitHub token used to authenticate API requests | + +## Release instructions In order to release a new version of this Action: From ee79368b356a630362736bdce5708b3be8b336bd Mon Sep 17 00:00:00 2001 From: Jess Bees <hi@toomanybees.com> Date: Wed, 3 May 2023 12:49:01 -0400 Subject: [PATCH 2/4] Link mentions of the upload-pages-artifact repo --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index db91682..88c7dda 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ jobs: url: ${{ steps.deployment.outputs.page_url }} ``` -To write to a different destination directory, match the inputs of both the `jekyll-build-pages` and `upload-pages-artifact` actions. +To write to a different destination directory, match the inputs of both the `jekyll-build-pages` and [`upload-pages-artifact`](https://github.com/actions/upload-pages-artifact) actions. ```yaml steps: @@ -62,7 +62,7 @@ steps: | Input | Default | Description | |-------|---------|-------------| | `source` | `./` | The directory to build from | -| `destination` | `./_site` | The directory to write output into<br>(this should match the `path` input of the `actions/upload-pages-artifact` action) | +| `destination` | `./_site` | The directory to write output into<br>(this should match the `path` input of the [`actions/upload-pages-artifact`](https://github.com/actions/upload-pages-artifact) action) | | `future` | `false` | If `true`, writes content dated in the future | | `build_revision` | `$GITHUB_SHA` | The SHA-1 of the Git commit for which the build is running | | `verbose` | `false` | If `true`, prints verbose output in logs | From 47e3d1eafbb7532d3adb06376187afb380e64188 Mon Sep 17 00:00:00 2001 From: Jess Bees <hi@toomanybees.com> Date: Wed, 3 May 2023 13:02:35 -0400 Subject: [PATCH 3/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 88c7dda..0da5884 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ This is used along with [`actions/deploy-pages`](https://github.com/actions/depl ## Usage -A basic workflow with the `jekyll-build-pages` action looks like this. +A basic Pages deployment workflow with the `jekyll-build-pages` action looks like this. ```yaml name: Build Jekyll site From bdbcb4c8548755184027ccca8216a859f3152eb3 Mon Sep 17 00:00:00 2001 From: Jess Bees <toomanybees@github.com> Date: Wed, 3 May 2023 22:52:09 -0400 Subject: [PATCH 4/4] Remove paths-ignore from test workflow, so README changes will run ci --- .github/workflows/test.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6646ad2..29a0508 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,11 +4,7 @@ on: push: branches: - main - paths-ignore: - - "README.md" pull_request: - paths-ignore: - - "README.md" env: # Use docker.io for Docker Hub if empty REGISTRY: ghcr.io