MAJ build_deploy 🚧 #58
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: Build | |
on: | |
pull_request | |
jobs: | |
build-front: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions/setup-node@v1 #this installs node and npm for us | |
with: | |
node-version: '18.x' | |
- uses: actions/cache@v1 # this allows for re-using node_modules caching, making builds a bit faster. | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: install packages | |
run: npm install #TODO: --only-prod, le build crash à voir pq | |
working-directory: ./front | |
- name: install angular cli | |
run: npm install -g @angular/cli > /dev/null | |
working-directory: ./front | |
- name: build prod | |
run: npm run build:prod | |
working-directory: ./front | |
build-back: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions/setup-node@v1 #this installs node and npm for us | |
with: | |
node-version: '18.x' | |
- uses: actions/cache@v1 # this allows for re-using node_modules caching, making builds a bit faster. | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: install packages | |
run: npm install | |
working-directory: ./back | |
- name: build | |
run: npm run build | |
working-directory: ./back |