Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update deploy flow #1422

Merged
merged 8 commits into from
Sep 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/deploy-site.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Deploy Website

on:
release:
types:
- published

env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
build:
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
npm version ${{ steps.get-version.outputs.version }}
git push --follow-tags