Skip to content

Commit

Permalink
Re-enable workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
fedebotu committed Jun 26, 2023
1 parent a085ee1 commit c0702a4
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 61 deletions.
114 changes: 57 additions & 57 deletions .github/workflows/build-preview.yaml
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
# name: build-preview
# run-name: build pull request preview

# on:
# # run when called from another workflow
# workflow_call:

# # run if user manually requests it
# workflow_dispatch:

# # variables
# env:
# PREVIEWS_FOLDER: preview

# permissions:
# contents: write
# pull-requests: write

# jobs:
# build-preview:
# runs-on: ubuntu-latest

# steps:
# # for debugging
# - name: Print contexts
# uses: crazy-max/ghaction-dump-context@v1

# - name: Checkout branch contents
# uses: actions/checkout@v3
# with:
# repository: ${{ github.event.pull_request.head.repo.full_name }}
# ref: ${{ github.head_ref }}

# - name: Install Ruby packages
# if: github.event.action != 'closed'
# uses: ruby/setup-ruby@v1
# with:
# ruby-version: "3.0"
# bundler-cache: true

# - name: Get Pages url
# if: github.event.action != 'closed'
# id: pages
# uses: actions/configure-pages@v2
# with:
# enablement: false

# - name: Build preview version of site
# if: github.event.action != 'closed'
# run: |
# JEKYLL_ENV=production bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path || '' }}/${{ env.PREVIEWS_FOLDER }}/pr-${{ github.event.number }}"

# - name: Commit preview to Pages branch
# uses: rossjrw/pr-preview-action@v1
# with:
# source-dir: _site
# umbrella-dir: ${{ env.PREVIEWS_FOLDER }}
name: build-preview
run-name: build pull request preview

on:
# run when called from another workflow
workflow_call:

# run if user manually requests it
workflow_dispatch:

# variables
env:
PREVIEWS_FOLDER: preview

permissions:
contents: write
pull-requests: write

jobs:
build-preview:
runs-on: ubuntu-latest

steps:
# for debugging
- name: Print contexts
uses: crazy-max/ghaction-dump-context@v1

- name: Checkout branch contents
uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}

- name: Install Ruby packages
if: github.event.action != 'closed'
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.0"
bundler-cache: true

- name: Get Pages url
if: github.event.action != 'closed'
id: pages
uses: actions/configure-pages@v2
with:
enablement: false

- name: Build preview version of site
if: github.event.action != 'closed'
run: |
JEKYLL_ENV=production bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path || '' }}/${{ env.PREVIEWS_FOLDER }}/pr-${{ github.event.number }}"
- name: Commit preview to Pages branch
uses: rossjrw/pr-preview-action@v1
with:
source-dir: _site
umbrella-dir: ${{ env.PREVIEWS_FOLDER }}
8 changes: 4 additions & 4 deletions .github/workflows/on-schedule.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
with:
open-pr: true

# build-preview:
# needs: update-citations
# if: needs.update-citations.outputs.changed == 'true'
# uses: ./.github/workflows/build-preview.yaml
build-preview:
needs: update-citations
if: needs.update-citations.outputs.changed == 'true'
uses: ./.github/workflows/build-preview.yaml

0 comments on commit c0702a4

Please sign in to comment.