-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.github: automate website publication
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
- Loading branch information
1 parent
3714be4
commit 47455ad
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Publish Website | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
cache: yarn | ||
- run: | | ||
yarn install --frozen-lockfile | ||
yarn build | ||
export WWW_COMMIT=`git rev-parse HEAD` | ||
- name: Publish PR change to www branch | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_branch: www | ||
publish_dir: ./build | ||
destination_dir: ./ | ||
user_name: 'github-actions[bot]' | ||
user_email: 'github-actions[bot]@users.noreply.github.com' | ||
commit_message: 'Published onprem.in website using branch@commit ${{ github.event.inputs.branch }}@${{ env.WWW_COMMIT }}' | ||
#force_orphan: true |