Bump tlienart/xranklin-build-action from d767328c7dc9345db12f2a6dcfdb3033bc17f0f8 to 9cfd0829d00a08b2708a7369a128c0c1be37a591 #79
Workflow file for this run
This file contains hidden or 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
name: Deploy | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
concurrency: | |
# Skip intermediate builds: always. | |
# Cancel intermediate builds: always. | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
options: | |
name: "Set options" | |
runs-on: ubuntu-latest | |
outputs: | |
deploy: ${{ steps.set-options.outputs.deploy }} | |
preview: ${{ steps.set-options.outputs.preview }} | |
steps: | |
- name: Set options | |
id: set-options | |
run: | | |
# By default always deploy | |
DEPLOY="true" | |
# Create previews only for pull requests | |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then | |
PREVIEW="previews/PR${PRNUM}" | |
# For pull requests, actually deploy only if the PR was opened on the same | |
# repository. | |
if [[ "${{ github.repository }}" != "${{ github.event.pull_request.head.repo.full_name }}" ]]; then | |
DEPLOY="false" | |
fi | |
else | |
PREVIEW="" | |
fi | |
echo "deploy=${DEPLOY}" | |
echo "deploy=${DEPLOY}" >> "${GITHUB_OUTPUT}" | |
echo "preview=${PREVIEW}" | |
echo "preview=${PREVIEW}" >> "${GITHUB_OUTPUT}" | |
env: | |
PRNUM: ${{ github.event.number }} | |
deploy: | |
name: "Build and Deploy" | |
needs: options | |
runs-on: ubuntu-latest | |
permissions: write-all | |
steps: | |
- uses: actions/checkout@v5 | |
- uses: julia-actions/cache@v2 | |
- uses: tlienart/xranklin-build-action@9cfd0829d00a08b2708a7369a128c0c1be37a591 | |
with: | |
# NOTE: this is the base URL prefix (landing page at /$BASE_URL_PREFIX/) | |
BASE_URL_PREFIX: "" | |
# Whether to deploy the website or not. Can do only for PRs opened | |
# from the same repository. | |
DEPLOY: ${{ needs.options.outputs.deploy }} | |
# Directory where to deploy the website. | |
PREVIEW: ${{ needs.options.outputs.preview }} |