-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
51 lines (45 loc) · 1.41 KB
/
deploy-site.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
name: Deploy Website
on:
workflow_run:
workflows: [Publish]
types:
- completed
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
on-success:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout formBuilder
uses: actions/checkout@v4
with:
repository: kevinchappell/formBuilder
fetch-depth: 1
ref: master
path: formBuilder
- name: Extract version from FormBuilder's package.json
id: get-version
run: |
VERSION=$(jq -r .version formBuilder/package.json)
echo "::set-output name=version::$VERSION"
- name: Checkout formBuilder-site
uses: actions/checkout@v4
with:
repository: kevinchappell/formBuilder-site
path: formBuilder-site
fetch-depth: 1
ref: master
token: ${{ secrets.FORMBUILDER_SITE_PAT }}
- name: Update website dependencies
run: |
cd formBuilder-site
git config --global user.name "GitHub Action"
git config --global user.email "[email protected]"
npm update formBuilder formBuilder-languages
git add .
git commit -m "Update formBuilder to ${{ steps.get-version.outputs.version }}"
npm version ${{ steps.get-version.outputs.version }}
git push --follow-tags