-
Notifications
You must be signed in to change notification settings - Fork 259
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
57 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,57 @@ | ||
name: "Build Frontend Dist" | ||
|
||
on: | ||
push: | ||
branches: | ||
- "master" | ||
- "dev" | ||
- "dist_build_action" | ||
|
||
# TODO only run if there have been changes to the frontend_vue folder | ||
jobs: | ||
build-frontend-dist: | ||
runs-on: ubuntu-20.04 | ||
env: | ||
NODE_VERSION: '18' | ||
permissions: | ||
id-token: write | ||
contents: read | ||
steps: | ||
- name: Record author | ||
run: | | ||
echo "# Owners" >> $GITHUB_STEP_SUMMARY | ||
echo "Author: ${{ github.event.head_commit.author.name }} (${{ github.event.head_commit.author.email }})" >> $GITHUB_STEP_SUMMARY | ||
echo "Committer: ${{ github.event.head_commit.committer.name }} (${{ github.event.head_commit.committer.email }})" >> $GITHUB_STEP_SUMMARY | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/[email protected] | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
|
||
- name: Install node modules | ||
working-directory: frontend_vue | ||
run: | | ||
npm ci | ||
# TODO, include MAPS KEY | ||
- name: Include git commit SHA for frontend release | ||
working-directory: frontend_vue | ||
run: | | ||
touch .env | ||
echo VITE_GITHUB_SHA=${GITHUB_SHA} >> .env | ||
cat .env | ||
- name: Build Frontend Dist | ||
working-directory: frontend_vue | ||
env: | ||
NODE_OPTIONS: "--max_old_space_size=4096" | ||
run: | | ||
rm -r dist | ||
npm run build | ||
- name: Commit report | ||
run: | | ||
git config --global user.name 'Frontend Github Action' | ||
git commit -am "Add Frontend Dist" | ||
git push |