This repository has been archived by the owner on Dec 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (72 loc) · 2.74 KB
/
hjelpestonad.yaml
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
name: hjelpestonad
on:
push:
branches:
- main
paths:
- "input/fsh/hjelpestonad/**"
jobs:
preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: 🍣 Run SUSHI
run: |
npm install -g fsh-sushi
sushi .
- name: Generate preview
run: |
mkdir generated
preview/generate-preview.sh fsh-generated/resources/Questionnaire-${{ github.workflow }}.json > generated/index.html
- name: 🚀 Deploy to GitHub-Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: generated
destination_dir: questionnaires/${{ github.workflow }}/current
exclude_assets: '**.zip,**.tgz,**.pack'
commit_message: '${{ env.IG }}: ${{ github.event.head_commit.message }}'
release:
runs-on: ubuntu-latest
steps:
- uses: GoogleCloudPlatform/release-please-action@v2
id: release-please
with:
path: input/fsh/${{ github.workflow }}
token: ${{ secrets.GITHUB_TOKEN }}
release-type: node
monorepo-tags: true
package-name: ${{ github.workflow }}
- uses: actions/checkout@v2
if: ${{ steps.release-please.outputs.release_created }}
- name: 🍣 Run SUSHI
if: ${{ steps.release-please.outputs.release_created }}
run: |
npm install -g fsh-sushi
sushi .
- name: Set Questionnaire version
if: ${{ steps.release-please.outputs.release_created }}
uses: deef0000dragon1/json-edit-action/@v1
env:
KEY: version
VALUE: ${{ steps.release-please.outputs.major }}.${{ steps.release-please.outputs.minor }}.${{ steps.release-please.outputs.patch }}
FILE: fsh-generated/resources/Questionnaire-${{ github.workflow }}.json
- uses: shogo82148/actions-upload-release-asset@v1
if: ${{ steps.release-please.outputs.release_created }}
with:
upload_url: ${{ steps.release-please.outputs.upload_url }}
asset_path: fsh-generated/resources/Questionnaire-${{ github.workflow }}.json
- uses: actions/setup-node@v1
if: ${{ steps.release-please.outputs.release_created }}
with:
node-version: 14
registry-url: 'https://npm.pkg.github.com'
- name: Publish
if: ${{ steps.release-please.outputs.release_created }}
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mv fsh-generated/resources/Questionnaire-${{ github.workflow }}.json input/fsh/${{ github.workflow }}/Questionnaire-${{ github.workflow }}.json
cd input/fsh/${{ github.workflow }}
npm install
npm publish