Skip to content

Fixing bugs with not showing the full error in comments #4

Fixing bugs with not showing the full error in comments

Fixing bugs with not showing the full error in comments #4

Workflow file for this run

name: Create Preview
on:
pull_request_target:
branches: [main]
types: [opened, synchronize, reopened]
jobs:
preview:
name: Preview
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get changed files in posts folder
id: get_changed_files
uses: tj-actions/changed-files@v44
with:
files: posts/**
json: "true"
- name: Create processed_files if not exist
if: steps.get_changed_files.outputs.any_changed == 'true'
run: |
if ! git show-ref --verify --quiet refs/heads/processed_files; then
git checkout --orphan processed_files
echo "" > processed_files.json
git add processed_files.json
git commit -m "Create processed_files"
git push origin processed_files
fi
- name: get published files cache
if: steps.get_changed_files.outputs.any_changed == 'true'
run: |
git fetch origin processed_files:processed_files
git checkout processed_files -- processed_files.json
- name: Set up Python
if: steps.get_changed_files.outputs.any_changed == 'true'
uses: actions/setup-python@v3
with:
python-version: 3.9
- name: Install dependencies
if: steps.get_changed_files.outputs.any_changed == 'true'
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Run script to create preview
if: steps.get_changed_files.outputs.any_changed == 'true'
env:
CHANGED_FILES: ${{ steps.get_changed_files.outputs.all_changed_files }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.number }}
run: python -u github_run.py --preview