Add a label to Search descriptions #314
Workflow file for this run
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
# Workflow to rebuild Spoons automatically | |
name: PR | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
pull_request: | |
branches: [ master ] | |
push: | |
branches: [ master ] | |
paths: | |
- '**.lua' | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Only run this if we're on the official repo. This prevents forks from getting super confusing with commits. If you want to host you own Spoon repository, consider re-enabling this, but for your repo. | |
if: github.repository == 'Hammerspoon/Spoons' | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Check-out the Spoons PR | |
- uses: actions/checkout@v4 | |
# Check-out the Hammerspoon repository we need for doc building | |
- uses: actions/checkout@v4 | |
with: | |
repository: 'Hammerspoon/hammerspoon' | |
path: 'hammerspoon' | |
# Install doc-building dependencies | |
- name: Install docs dependencies | |
run: | | |
cd $GITHUB_WORKSPACE/hammerspoon | |
/usr/bin/python3 -m pip install -r requirements.txt | |
# Find files modified by this PR | |
- uses: lots0logs/gh-action-get-changed-files@2.2.2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
# Show modified files, as a debug log | |
- name: Show changed files | |
run: cat $HOME/files.json | |
# Lint docstrings | |
- name: Docstrings Linter | |
run: ./gh_actions_doclint.sh | |
# Fail CI run if docstrings failed | |
- name: Check for docstring lint failures | |
run: ./gh_actions_doclint.sh -v | |
# Update docs and zips | |
- name: Update docs and zips | |
run: ./gh_actions_publish.sh | |
# Push changes | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
if: github.event_name == 'push' | |