File tree Expand file tree Collapse file tree 3 files changed +44
-25
lines changed Expand file tree Collapse file tree 3 files changed +44
-25
lines changed Original file line number Diff line number Diff line change
1
+ name : Build
2
+ on :
3
+ pull_request :
4
+ branches :
5
+ - main
6
+ push :
7
+ branches :
8
+ - main
9
+ jobs :
10
+ build :
11
+ name : Build
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - uses : actions/checkout@v2
15
+ - name : Build
16
+ run : ./compile.sh
17
+ - name : Deploy
18
+ if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
19
+ uses : peaceiris/actions-gh-pages@v3
20
+ with :
21
+ github_token : ${{ secrets.GITHUB_TOKEN }}
22
+ publish_dir : ./out
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 10
10
11
11
set -e # Exit with nonzero exit code if anything fails
12
12
13
- echo Running bikeshed on index.src.html
14
- bikeshed -f spec ./index.src.html
15
-
16
- for SPEC in $FILES ; do
13
+ for SPEC in index.src.html $FILES ; do
17
14
echo Running bikeshed on $SPEC
18
- bikeshed -f spec $SPEC
15
+ if which bikeshed; then
16
+ bikeshed -f spec $SPEC
17
+ else
18
+ SPEC_OUT=${SPEC% .bs} .html
19
+ HTTP_STATUS=$( curl https://api.csswg.org/bikeshed/ \
20
+ --output ${SPEC_OUT} \
21
+ --write-out " %{http_code}" \
22
+ --header " Accept: text/plain, text/html" \
23
+ -F file=@${SPEC} )
24
+ if [ " $HTTP_STATUS " -ne " 200" ]; then
25
+ echo " " ; cat $SPEC_OUT ; echo " "
26
+ rm -f $SPEC_OUT
27
+ exit 1
28
+ fi
29
+ fi
19
30
done
20
31
21
32
OUTDIR=${1:- out}
22
33
34
+ mkdir -p $OUTDIR
35
+
23
36
if [ -d $OUTDIR ]; then
24
- echo Copy index.html into $OUTDIR /index.html
25
- cp index.html $OUTDIR /index.html
37
+ echo Move index.html into $OUTDIR /index.html
38
+ mv index.html $OUTDIR /$SPEC_OUT
26
39
for SPEC in $FILES ; do
27
40
SPEC_OUT=${SPEC% .bs} .html
28
41
if [ -f $SPEC_OUT ]; then
29
- echo Copy $SPEC_OUT into $OUTDIR /$SPEC_OUT
30
- cp $SPEC_OUT $OUTDIR /$SPEC_OUT
42
+ echo Move $SPEC_OUT into $OUTDIR /$SPEC_OUT
43
+ mv $SPEC_OUT $OUTDIR /$SPEC_OUT
31
44
fi
32
45
done
33
46
fi
You can’t perform that action at this time.
0 commit comments