forked from w3c/spec-prod
-
Notifications
You must be signed in to change notification settings - Fork 3
/
action.yml
106 lines (97 loc) · 3.32 KB
/
action.yml
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Spec Prod
author: "Sid Vishnoi"
description: "Build ReSpec/Bikeshed specs, validate output and publish to w3.org or GitHub pages"
branding:
icon: archive
color: blue
inputs:
TOOLCHAIN:
description: Possible values - 'respec', 'bikeshed'
SOURCE:
description: Source file path.
VALIDATE_LINKS:
description: Validate hyperlinks
default: true
VALIDATE_MARKUP:
description: Validate markup
default: true
GH_PAGES_BRANCH:
description: Provide a branch name to deploy to GitHub pages.
GH_PAGES_TOKEN:
description: GitHub Personal access token. Required only if the default GitHub actions token doesn't have enough permissions.
W3C_ECHIDNA_TOKEN:
description: Echidna token
W3C_MANIFEST_URL:
description: Echidna manifest URL
W3C_WG_DECISION_URL:
description: A URL to the working group decision to use auto-publish (usually from a w3c mailing list).
W3C_NOTIFICATIONS_CC:
description: Comma separated list of email addresses to CC
runs:
using: composite
steps:
- name: Prepare
id: prepare
run: |
echo "::group::Prepare"
node ${{ github.action_path }}/prepare.js
echo "::endgroup::"
shell: bash
env:
INPUTS_USER: ${{ toJSON(inputs) }}
INPUTS_GITHUB: ${{ toJSON(github) }}
- name: Setup toolchain
run: |
echo "::group::Setup toolchain"
${{ github.action_path }}/setup.sh
echo "::endgroup::"
shell: bash
env:
INPUTS_TOOLCHAIN: ${{ fromJson(steps.prepare.outputs.all).toolchain }}
HOME: /home/runner
- name: Generate Static HTML
id: generate-html
run: |
echo "::group::Generate Static HTML"
node ${{ github.action_path }}/build.js
echo "::endgroup::"
shell: bash
env:
INPUTS_TOOLCHAIN: ${{ fromJson(steps.prepare.outputs.all).toolchain }}
INPUTS_SOURCE: ${{ fromJson(steps.prepare.outputs.all).source }}
- name: Validate hyperlinks
run: |
echo "::group::Validate hyperlinks"
node ${{ github.action_path }}/validate-links.js
echo "::endgroup::"
shell: bash
env:
INPUTS_VALIDATE_LINKS: ${{ fromJson(steps.prepare.outputs.all).validate.links }}
OUTPUT_FILE: ${{ steps.generate-html.outputs.output }}
- name: Validate markup
run: |
echo "::group::Validate markup"
node ${{ github.action_path }}/validate-markup.js
echo "::endgroup::"
shell: bash
env:
INPUTS_VALIDATE_MARKUP: ${{ fromJson(steps.prepare.outputs.all).validate.markup }}
OUTPUT_FILE: ${{ steps.generate-html.outputs.output }}
- name: Deploy to GitHub pages
run: |
echo "::group::Deploy to GitHub pages"
node ${{ github.action_path }}/deploy-gh-pages.js
echo "::endgroup::"
shell: bash
env:
INPUTS_DEPLOY: ${{ toJson(fromJson(steps.prepare.outputs.all).deploy.ghPages) }}
INPUTS_SOURCE: ${{ fromJson(steps.prepare.outputs.all).source }}
OUTPUT_FILE: ${{ steps.generate-html.outputs.output }}
- name: Deploy to W3C
run: |
echo "::group::Deploy to W3C"
node ${{ github.action_path }}/deploy-w3c-echidna.js
echo "::endgroup::"
shell: bash
env:
INPUTS_DEPLOY: ${{ toJson(fromJson(steps.prepare.outputs.all).deploy.w3c) }}