-
Notifications
You must be signed in to change notification settings - Fork 4
59 lines (56 loc) · 1.88 KB
/
deploy.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
name: Deploy to GitHub Pages and NPM
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.author.email, '[email protected]')"
steps:
- name: Checkout
uses: actions/checkout@v2
with:
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
- name: Identify
run: |
git config user.name OpenActive Bot
git config user.email [email protected]
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14
registry-url: https://registry.npmjs.org/
- name: Increment Version (for security - and CSP asset alignment - every change to the template files is a breaking change)
# TODO: Make this conditional on if template files have actually changed
run: npm version major
- name: Install and Build using incremented version
run: npm ci
- name: Publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Push version update
run: git push
- name: Copy examples to deployment directory
run: cp jsonld-samples/* dist/
- name: Publish to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
force_orphan: true
enable_jekyll: true
dispatch:
needs: deploy
strategy:
matrix:
repo: ['OpenActive.DatasetSite.NET', 'dataset-site-template-php', 'dataset-site-template-ruby']
runs-on: ubuntu-latest
steps:
- name: Trigger tooling update
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
repository: openactive/${{ matrix.repo }}
event-type: dataset-site-template-update