build(deps-dev): bump husky from 8.0.1 to 9.1.7 #109
Workflow file for this run
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 and Deploy to Netlify | |
on: | |
push: | |
pull_request: | |
env: | |
FONTAWESOME_NPM_AUTH_TOKEN: ${{secrets.FONTAWESOME_NPM_AUTH_TOKEN}} | |
jobs: | |
lint: | |
name: lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
- run: npm ci | |
- run: npm run lint | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
- run: npm ci | |
- run: npm test | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
release: | |
runs-on: ubuntu-latest | |
needs: | |
- lint | |
- test | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
registry-url: https://registry.npmjs.org/ | |
- run: npm ci | |
- run: npm run release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
buildAndDeploy: | |
name: Build and Deploy | |
runs-on: ubuntu-18.04 | |
needs: | |
- release | |
outputs: | |
deploy-url: ${{ steps.netlify.outputs.deploy-url }} | |
steps: | |
- uses: actions/checkout@v2 | |
# ( Build to ./dist or other directory... ) | |
- run: npm ci | |
- run: npm run build | |
- name: Deploy to Netlify | |
id: netlify | |
uses: nwtgck/[email protected] | |
with: | |
publish-dir: "./out" | |
production-branch: main | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
deploy-message: "Deploy from GitHub Actions" | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
timeout-minutes: 1 | |
cypress-run: | |
runs-on: ubuntu-20.04 | |
needs: buildAndDeploy | |
if: needs.buildAndDeploy.outputs.deploy-url != '' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- run: npm ci | |
- name: Cypress run | |
uses: cypress-io/github-action@v4 | |
with: | |
browser: chrome | |
record: true | |
config: baseUrl=${{ needs.buildAndDeploy.outputs.deploy-url }} | |
env: | |
# pass the Dashboard record key as an environment variable | |
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | |
# pass GitHub token to allow accurately detecting a build vs a re-run build | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# pass the project ID from the secrets through environment variable | |
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }} | |
BASE_URL: ${{ needs.buildAndDeploy.outputs.deploy-url }} | |
- uses: actions/upload-artifact@v2 | |
if: failure() | |
with: | |
name: cypress-screenshots | |
path: cypress/screenshots | |
- uses: actions/upload-artifact@v2 | |
if: always() | |
with: | |
name: cypress-videos | |
path: cypress/videos |