Skip to content

Commit

Permalink
feat: 👷 webpage preview on pull request
Browse files Browse the repository at this point in the history
+ build artifact caching for optimization
  • Loading branch information
djmaxus committed Sep 13, 2024
1 parent ac57be7 commit 02a011f
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/webpage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ name: Repository webpage
on:
push:
branches: ["main"]
workflow_dispatch:
pull_request:
branches: ["main"]

permissions:
contents: read
Expand All @@ -19,6 +20,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
vendor/bundle
.jekyll-cache
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gem-
- uses: actions/configure-pages@v5
- uses: actions/jekyll-build-pages@v1
with:
Expand All @@ -27,6 +36,7 @@ jobs:
- uses: actions/upload-pages-artifact@v3

deploy:
if: ${{ github.event_name != 'pull_request' }}
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down

0 comments on commit 02a011f

Please sign in to comment.