forked from 1EdTech/openbadges-specification
-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (60 loc) · 1.92 KB
/
ob_v3p0_pr.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
name: Build OB 3.0 Spec Preview
on:
# Triggers the workflow on push or pull request events but only for the develop branch
pull_request:
branches:
- develop
jobs:
sideload:
name: Sideload the ob_v3p0.lines file
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: curl -H 'X-Api-Key:${{ secrets.API_KEY }}' -F 'file=@ob_v3p0/ob_v3p0.lines' https://imsum2.herokuapp.com/upload
continue-on-error: false
build:
name: Build a static version of the Respec document
needs: sideload
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Unlock secrets
uses: sliteteam/[email protected]
env:
GIT_CRYPT_KEY: ${{ secrets.GIT_CRYPT_KEY }}
- uses: w3c/spec-prod@v2
with:
SOURCE: "ob_v3p0/ob_v3p0.html"
DESTINATION: "docs/ob_v3p0.html"
TOOLCHAIN: respec
VALIDATE_MARKUP: false
VALIDATE_WEBIDL: false
VALIDATE_LINKS: false
BUILD_FAIL_ON: nothing
publish:
name: Publish to GH pages
needs: build
runs-on: ubuntu-latest
steps:
- name: Get branch name from PR
uses: andrevalentin/get-branch-name-by-pr@v1
id: pr_data
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
pr-id: ${{ github.event.number }}
- name: Checkout the branch
uses: actions/checkout@v2
with:
ref: ${{ steps.pr_data.outputs.branch }}
- name: Download artifact created by build job
uses: actions/download-artifact@v2
with:
name: spec-prod-result
path: docs
- name: Commit the new/updated doc
run: |
git add docs/*
git config --local user.name "GitHub Actions"
git config --local user.email "[email protected]"
git commit --allow-empty -m "Automated build"
git push origin