File: format_emscripten.yml

package info (click to toggle)
cataclysm-dda 0.H-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 710,808 kB
  • sloc: cpp: 524,019; python: 11,580; sh: 1,228; makefile: 1,169; xml: 507; javascript: 150; sql: 56; exp: 41; perl: 37
file content (64 lines) | stat: -rw-r--r-- 1,765 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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@v3

      - 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@v3
        with:
          name: formatter
          path: formatter.html

      - uses: actions/checkout@v3
        with:
          ref: gh-pages

      - uses: actions/download-artifact@v3
        with:
          name: formatter

      - name: Display files
        run: ls -a

      - name: Create Pull Request
        uses: peter-evans/create-pull-request@v4
        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