Skip to content

Deploy Website

Deploy Website #71

Workflow file for this run

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 "action@github.com"
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