Merge pull request #86 from 0xLaurens/dependabot/npm_and_yarn/microma… #104
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
# .github/workflows/netlify.yml | |
name: Build and Deploy to Netlify | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-artifacts: | |
name: "Build Artifacts" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: npm install and build the Triplo website | |
run: | | |
npm install --legacy-peer-deps | |
npm run build --production | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Triplo | |
path: './dist/apps/triplo' | |
run-tests: | |
name: "Run Tests" | |
runs-on: ubuntu-latest | |
needs: build-artifacts | |
steps: | |
- uses: actions/checkout@v3 | |
- name: npm install and run test | |
run: | | |
npm install --legacy-peer-deps | |
npm run test | |
deploy-to-netlify: | |
name: "Deploy to Netlify" | |
runs-on: ubuntu-latest | |
needs: run-tests | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Download artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: Triplo | |
path: './dist/apps/triplo' | |
- name: Deploy to Netlify | |
uses: nwtgck/[email protected] | |
with: | |
publish-dir: './dist/apps/triplo' | |
production-branch: main | |
enable-commit-comment: true | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
timeout-minutes: 1 |