blob: 4884c4e8b86da342170e915616a92d164ccc7c87 (
plain) (
tree)
|
|
name: preview-pr
on:
pull_request_target:
types: [opened, reopened]
permissions:
pull-requests: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
bundler-cache: true
- run: bundle exec jekyll build --baseurl ""
- name: Publish to Cloudflare Pages
id: preview-pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT }}
projectName: hack-gpon-preview
directory: _site
branch: preview
- uses: thollander/actions-comment-pull-request@v2
with:
message: |
Preview of the website obtained from the PR: ${{ steps.preview-pages.outputs.url }}
|