From fc43502394031f495562962914bad629a5d964b6 Mon Sep 17 00:00:00 2001 From: Willy Date: Tue, 31 Jan 2023 23:09:41 +0000 Subject: [PATCH] dockerfile-like rice-box build --- .github/workflows/build.yml | 37 ++++++++++++------------------------- 1 file changed, 12 insertions(+), 25 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d1dffff8..95597a6c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,38 +40,25 @@ jobs: - uses: actions/setup-go@v2 with: go-version: ${{ needs.data.outputs.go_version }} + - name: Install rice + run: go install github.com/GeertJohan/go.rice/rice@latest - uses: actions/setup-node@v1 with: node-version: ${{ needs.data.outputs.node_version }} - - - name: Add go/bin to path - run: | - echo "$(go env GOPATH)/bin" >> $GITHUB_PATH - shell: bash - - - name: Install Global Dependencies - run: npm install -g yarn sass cross-env mjml - - name: Download Frontend Dependencies working-directory: ./frontend run: yarn - - - name: Download Go mods - run: | - go mod download - go mod verify - make test-deps - - name: Build Frontend Statping - env: - VERSION: ${{ needs.data.outputs.version }} - COMMIT: ${{ github.sha }} - MJML_APP: ${{ secrets.MJML_APP }} - MJML_PRIVATE: ${{ secrets.MJML_PRIVATE }} - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - run: make clean generate compile - + working-directory: ./frontend + run: yarn build + - name: Copy built frontend + run: | + cp -r frontend/dist source/ + cp -r frontend/src/assets/scss source/dist/ + cp frontend/public/robots.txt source/dist/ + - name: Build rice-box.go + run: rice embed-go + working-directory: source - name: Upload Compiled Frontend (rice-box.go) uses: actions/upload-artifact@v1 with: