mirror of
https://github.com/stronk-dev/RandomChad.git
synced 2025-07-05 10:35:08 +02:00
Trigger minter deploy
This commit is contained in:
parent
f6629e27c8
commit
aa318a6ee3
67
.github/workflows/deploy-minter.yml
vendored
Normal file
67
.github/workflows/deploy-minter.yml
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
name: Deploy Minter on push/merge
|
||||
|
||||
# Only trigger on PR/push and only for frontend files
|
||||
on:
|
||||
# Trigger on PR close
|
||||
pull_request:
|
||||
types: [ closed ]
|
||||
paths:
|
||||
- 'minter/*.json'
|
||||
- 'minter/*.js'
|
||||
- 'minter/**'
|
||||
- '.github/workflows/deploy-minter.yml'
|
||||
branches:
|
||||
- main
|
||||
|
||||
# Trigger on push to master (edge case, local merge)
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'minter/*.json'
|
||||
- 'minter/*.js'
|
||||
- 'minter/**'
|
||||
- '.github/workflows/deploy-minter.yml'
|
||||
|
||||
jobs:
|
||||
# Build the frontend giles
|
||||
build:
|
||||
name: Compile frontend
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
# Get the repo files from current commit
|
||||
- name: Cloning repository
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: Read .nvmrc
|
||||
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
|
||||
id: nvm
|
||||
working-directory: minter
|
||||
|
||||
- name: Set Node.js (.nvmrc)
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: "${{ steps.nvm.outputs.NVMRC }}"
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm i
|
||||
working-directory: minter
|
||||
|
||||
- name: test if all links work
|
||||
run: npm test
|
||||
working-directory: minter
|
||||
|
||||
- name: Build website files
|
||||
env:
|
||||
NODE_ENV: production
|
||||
run: npm run build
|
||||
working-directory: minter
|
||||
|
||||
- name: Deploy to Firebase
|
||||
uses: w9jds/firebase-action@master
|
||||
with:
|
||||
args: deploy --only hosting:minter
|
||||
env:
|
||||
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
|
Loading…
x
Reference in New Issue
Block a user