Skip to content

Publish Preview

Publish Preview #8

Workflow file for this run

name: Publish Preview
on:
workflow_dispatch:
inputs:
pr_num:
description: "PR number"
type: number
required: true
permissions:
contents: read
jobs:
publish:
name: Publish preview to GitHub Pages
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@master
ref: gh-pages

Check failure on line 21 in .github/workflows/preview.yml

View workflow run for this annotation

GitHub Actions / Publish Preview

Invalid workflow file

The workflow is not valid. .github/workflows/preview.yml (Line: 21, Col: 9): Unexpected value 'ref'
- name: Update GitHub Pages
env:
GH_TOKEN: ${{ github.token }}
run: |
git config user.name "Preview Deploy"
git config user.email ""
rm -rf pr-${{ inputs.pr_num }}
mkdir pr-${{ inputs.pr_num }}
gh run download --name preview-${{ inputs.pr_num }} --dir pr-${{ inputs.pr_num }}
git add -A
git commit -m 'Preview pr-${{ inputs.pr_num }}'
git push origin +gh-pages