Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
mclmax committed Jun 6, 2024
1 parent 3a75df2 commit 9facb57
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 70 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/build_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- "master"
- "dev"
- "dist_build_action"

workflow_dispatch:
inputs:
Expand All @@ -14,6 +15,65 @@ on:
default: "master"

jobs:
build-and-commit-frontend-dist:
runs-on: ubuntu-20.04
env:
NODE_VERSION: '18'
permissions:
id-token: write
contents: write
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/setup-node@v3.5.1
with:
node-version: ${{ env.NODE_VERSION }}

- name: Install node modules
working-directory: frontend_vue
run: |
npm config set "@fortawesome:registry" https://npm.fontawesome.com/
npm config set '//npm.fontawesome.com/:_authToken' "${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }}"
npm ci
- name: Include git commit SHA and Google Maps Key for Frontend Development release
if: github.ref == 'refs/heads/dev'
working-directory: frontend_vue
run: |
touch .env
echo VITE_GITHUB_SHA=${GITHUB_SHA} >> .env
echo VITE_GOOGLE_MAPS_API_KEY="${{ secrets.GOOGLE_MAPS_API_KEY_DEV }}" >> .env
cat .env
- name: Include git Google Maps Key for Frontend Production release
if: github.ref == 'refs/heads/master'
working-directory: frontend_vue
run: |
touch .env
echo VITE_GOOGLE_MAPS_API_KEY="${{ secrets.GOOGLE_MAPS_API_KEY_PROD }}" >> .env
cat .env
- name: Build Frontend Dist
working-directory: frontend_vue
env:
NODE_OPTIONS: "--max_old_space_size=4096"
run: |
rm -rf dist
npm run build
- name: Commit report
run: |
git config --global user.name "Frontend Github Action"
git add -f frontend_vue/dist
git commit -am "Add Frontend Dist"
git push
build:
runs-on: ubuntu-20.04
env:
Expand Down
70 changes: 0 additions & 70 deletions .github/workflows/frontend.yml

This file was deleted.

0 comments on commit 9facb57

Please sign in to comment.