collection of reusable workflows for GitHub Actions
This collection of Reusable Workflows can be used in any GitHub Action.
checkout, install dependencies and run a node command script
prettier:
uses: kerhub/reusable-workflows/.github/workflows/node-job.yml@main
with:
command: npm run prettier --check \"**\"
build the app and deploy it to a preview Netlify channel
deploy_preview:
name: 'deploy preview'
if: github.event_name == 'pull_request'
needs: [prettier, linter, unit_tests]
uses: kerhub/reusable-workflows/.github/workflows/netlify-preview-deploy.yml@main
with:
build_directory: './output/dist'
secrets:
netlifyAuthToken: "${{ secrets.NETLIFY_AUTH_TOKEN }}"
netlifySiteId: "${{ secrets.NETLIFY_SITE_ID }}"
repoToken: "${{ secrets.GITHUB_TOKEN }}"
build the app and deploy it to the live Netlify channel
deploy_live:
name: 'deploy live'
if: github.event_name == 'push'
needs: [prettier, linter, unit_tests]
uses: kerhub/reusable-workflows/.github/workflows/netlify-live-deploy.yml@main
with:
build_directory: './output/dist'
secrets:
netlifyAuthToken: "${{ secrets.NETLIFY_AUTH_TOKEN }}"
netlifySiteId: "${{ secrets.NETLIFY_SITE_ID }}"
audit a preview channel with Lighthouse
lighthouse_preview:
name: 'lighthouse preview'
needs: deploy_preview
uses: kerhub/reusable-workflows/.github/workflows/lighthouse-preview.yml@main
with:
siteName: 'dojo-realworld'
secrets:
netlifyAuthToken: "${{ secrets.NETLIFY_AUTH_TOKEN }}"
audit a live channel with Lighthouse
lighthouse_live:
name: 'lighthouse live'
needs: deploy_live
uses: kerhub/reusable-workflows/.github/workflows/lighthouse-live.yml@main
with:
siteUrl: 'https://dojo-realworld.netlify.app/'