dockerfile-like rice-box build

pull/1118/head
Willy 2023-01-31 23:09:41 +00:00
parent 88dca8c9c3
commit fc43502394
No known key found for this signature in database
GPG Key ID: 1A43E076B0272479
1 changed files with 12 additions and 25 deletions

View File

@ -40,38 +40,25 @@ jobs:
- uses: actions/setup-go@v2 - uses: actions/setup-go@v2
with: with:
go-version: ${{ needs.data.outputs.go_version }} 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 - uses: actions/setup-node@v1
with: with:
node-version: ${{ needs.data.outputs.node_version }} 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 - name: Download Frontend Dependencies
working-directory: ./frontend working-directory: ./frontend
run: yarn run: yarn
- name: Download Go mods
run: |
go mod download
go mod verify
make test-deps
- name: Build Frontend Statping - name: Build Frontend Statping
env: working-directory: ./frontend
VERSION: ${{ needs.data.outputs.version }} run: yarn build
COMMIT: ${{ github.sha }} - name: Copy built frontend
MJML_APP: ${{ secrets.MJML_APP }} run: |
MJML_PRIVATE: ${{ secrets.MJML_PRIVATE }} cp -r frontend/dist source/
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} cp -r frontend/src/assets/scss source/dist/
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} cp frontend/public/robots.txt source/dist/
run: make clean generate compile - name: Build rice-box.go
run: rice embed-go
working-directory: source
- name: Upload Compiled Frontend (rice-box.go) - name: Upload Compiled Frontend (rice-box.go)
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with: