Merge branch 'master' into frontend-release #83
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
name: Frontend build | |
on: | |
push: | |
branches: [frontend-release] | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install npm | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.15 | |
- name: Install packages and run tests | |
working-directory: frontend | |
run: | | |
npm ci | |
npm run test | |
- name: Build frontend | |
working-directory: frontend | |
run: | | |
npx next build | |
npx next export | |
env: | |
NEXT_PUBLIC_GA_MEASUREMENT_ID: ${{ secrets.NEXT_PUBLIC_GA_MEASUREMENT_ID }} | |
NEXT_PUBLIC_IMAGE_BUCKET_URL: ${{ secrets.NEXT_PUBLIC_IMAGE_BUCKET_URL }} | |
NEXT_PUBLIC_IMAGE_WORKER_URL: ${{ secrets.NEXT_PUBLIC_IMAGE_WORKER_URL }} | |
- name: Publish frontend to GitHub Pages repo | |
uses: dmnemec/copy_file_to_another_repo_action@main | |
env: | |
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} | |
with: | |
source_file: "frontend/out/." | |
destination_repo: "mpcautofill/mpcautofill.github.io" | |
user_email: "[email protected]" | |
user_name: "chilli-axe" |