Skip to content

Test (3rd) Preview

Test (3rd) Preview #52

Workflow file for this run

# https://github.com/rossjrw/pr-preview-action
name: Preview
on:
# NOT on push: branches: - 'main'
# ? delete:
pull_request_target:
types:
- opened
- reopened
- synchronize
- closed
permissions:
contents: read
concurrency: preview-${{ github.ref }}
jobs:
preview:
name: Preview
runs-on: ubuntu-latest
# Sets permissions of the GITHUB_TOKEN to allow post comment with Preview URL
permissions:
issues: write
pull-requests: write
steps:
- name: Checkout PR head
if: ${{ startsWith(github.event_name, 'pull_request') && github.event.action != 'closed' }}
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Build
if: ${{ github.event.action != 'closed' }} # Skipping these steps if the PR has been closed
# run: ./build.sh
run: echo "Hi! Buidling..."
- name: Deploy preview
# TODO Re-check if https://github.com/actions/deploy-pages#inputs- support of "preview" is no longer "only in alpha currently and is not available to the public"
uses: rossjrw/pr-preview-action@v1
with:
source-dir: ./site/
# https://github.com/www-learn-study/previews
deploy-repository: www-learn-study/previews
# custom-url: https://www-learn-study.github.io/previews
token: ${{ secrets.PREVIEW_TOKEN }}