diff --git a/.github/workflows/deploy-site.yaml b/.github/workflows/deploy-site.yaml index 4ade013b3..7b9645d10 100644 --- a/.github/workflows/deploy-site.yaml +++ b/.github/workflows/deploy-site.yaml @@ -25,11 +25,19 @@ jobs: 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@v3 with: repository: kevinchappell/formBuilder-site + path: formBuilder-site fetch-depth: 1 ref: master token: ${{ secrets.FORMBUILDER_SITE_PAT }} @@ -39,10 +47,9 @@ jobs: node-version: 18 cache: 'npm' - - name: Update website dependencies run: | cd kevinchappell/formBuilder-site npm update formBuilder formBuilder-languages - npm version $(cd ../formBuilder && node -p "require('./package.json').version") + npm version ${{ steps.get-version.outputs.version }} git push --follow-tags