Skip to content

EmmyLua: save timestamps of docs.json to skip if no change #243

EmmyLua: save timestamps of docs.json to skip if no change

EmmyLua: save timestamps of docs.json to skip if no change #243

Workflow file for this run

# 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@v2
# Check-out the Hammerspoon repository we need for doc building
- uses: actions/checkout@v2
with:
repository: 'Hammerspoon/hammerspoon'
path: 'hammerspoon'
# Send IRC notification for new PRs
- uses: Gottox/[email protected]
if: ${{ always() && github.event_name == 'pull_request' && github.repository == 'hammerspoon/Spoons' }}
with:
channel: '#hammerspoon'
nickname: 'HSGHA'
message: |
Spoon PR: ${{ github.event.pull_request.title }}
* ${{ github.actor }}
* ${{ github.event.pull_request.html_url }}
# 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/[email protected]
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'