68 lines
2.0 KiB
YAML
68 lines
2.0 KiB
YAML
name: JSON Formatter in HTML
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
paths:
|
|
- 'tools/format/**'
|
|
- 'tools/format_emscripten/**'
|
|
- '.github/workflows/format_emscripten.yml'
|
|
|
|
env:
|
|
TX_TOKEN: ${{ secrets.TX_TOKEN }}
|
|
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
if: github.repository == 'CleverRaven/Cataclysm-DDA'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: checkout repository
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: install dependencies (ubuntu)
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install emscripten
|
|
- name: Build with emcc (emscripten)
|
|
run: tools/format_emscripten/build.sh
|
|
|
|
- name: Display files
|
|
run: ls -a
|
|
|
|
- name: Upload zipped html as artifact
|
|
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
|
|
with:
|
|
name: formatter
|
|
path: formatter.html
|
|
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
ref: gh-pages
|
|
persist-credentials: false
|
|
|
|
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
|
|
with:
|
|
name: formatter
|
|
|
|
- name: Display files
|
|
run: ls -a
|
|
|
|
- name: Create Pull Request
|
|
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6
|
|
with:
|
|
token: ${{ secrets.TX_PR_CREATOR }}
|
|
commit-message: JSON linter gh-pages file update
|
|
base: gh-pages
|
|
branch: gh-pages-json-linter-update
|
|
branch-suffix: short-commit-hash
|
|
delete-branch: true
|
|
add-paths: formatter.html
|
|
title: Update Github Pages JSON linter page
|
|
body: "#### Summary\nNone\n\n#### Additional context\nAutomatically generated PR from emscripten compile output"
|
|
labels: Organization,<Documentation>
|
|
# create as a draft to allow maintainers to cull the changes before merging
|
|
draft: true
|