[pre-commit.ci] pre-commit autoupdate #147
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/rossjrw/pr-preview-action | |
name: Preview | |
on: | |
# NOT on push: branches: - 'main' | |
# ? delete: | |
pull_request: | |
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 | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
fetch-depth: 0 | |
- name: Build | |
if: ${{ github.event.action != 'closed' }} # Skipping these steps if the PR has been closed | |
run: ./build.sh | |
- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1 | |
id: changes | |
with: | |
filters: | | |
workflows: | |
- '.github/workflows/**' | |
- name: Deploy preview | |
# https://github.com/www-learn-study/saraswati.learn.study/issues/50 | |
if: steps.changes.outputs.workflows == 'false' | |
# 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/[email protected] | |
with: | |
source-dir: BUILT/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 }} |