feat: APPS-2773 Create Component FTVA ResponsiveImage #2624
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: Run CI Suite | |
on: | |
push: | |
branches: [ vue3.x ] | |
pull_request: | |
branches: [ vue3.x ] | |
# Cancel this run if a newer commit is pushed | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
percy-instructions: | |
if: github.event_name == 'pull_request' | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- name: Comment with percy instructions | |
uses: bubkoo/auto-comment@v1 | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
pullRequestOpened: > | |
# Percy Screenshots | |
In order to conserve our percy screenshot allowance, percy is not configured to run automatically. Please make sure the PR is ready and all other checks are passing, then start it manually: | |
1. Visit https://github.com/UCLALibrary/ucla-library-website-components/actions/workflows/percy.yml | |
2. Click the 'Run workflow' button in the blue bar. | |
3. Select the correct branch for this PR and click 'Run workflow' again to confirm. | |
eslint: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
token: ${{ secrets.PAT_SEMENTIC_RELEASE_AND_ESLINT }} # non-github token Parinita's personal access token will expire ever 90 days | |
- uses: ./.github/workflows/setup-workspace | |
- run: pnpm run lint | |
- uses: EndBug/add-and-commit@v9 | |
with: | |
message: "chore: linter autofixes" | |
default_author: github_actions | |
vite: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/workflows/setup-workspace | |
- run: pnpm run build | |
storybook: | |
runs-on: ubuntu-latest | |
timeout-minutes: 25 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ./.github/workflows/setup-workspace | |
- name: Cache Storybook Build | |
id: cache-storybook | |
uses: actions/cache@v3 | |
with: | |
path: storybook-static | |
key: storybook-${{ github.sha }} | |
- run: pnpm run build-storybook | |
- name: Deploy to Netlify (merged) | |
if: github.ref_name=='vue3.x' | |
uses: nwtgck/actions-netlify@v2 # v1.2.3 | |
with: | |
production-deploy: true | |
deploy-message: https://github.com/UCLALibrary/ucla-library-website-component/commit/${{ github.sha }} | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
publish-dir: './storybook-static' | |
fails-without-credentials: true | |
github-deployment-environment: test | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID_STORYBOOK_VUE3X }} | |
- name: Deploy to Netlify (preview) | |
if: github.ref_name!='main' | |
uses: nwtgck/actions-netlify@v2 # v1.2.3 | |
with: | |
production-deploy: false | |
deploy-message: https://github.com/UCLALibrary/ucla-library-website-component/pull/${{ github.event.pull_request.number }} | |
alias: deploy-preview-${{ github.event.pull_request.number }} | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
overwrites-pull-request-comment: true | |
publish-dir: './storybook-static' | |
fails-without-credentials: true | |
github-deployment-environment: storybook--${{ github.event_name }}-${{ github.event.number }} | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID_STORYBOOK_VUE3X }} | |
- name: Cypress test for Storybook Components | |
uses: cypress-io/github-action@v5 | |
with: | |
start: pnpm dlx http-server ./storybook-static -p 6006 | |
wait-on: http://localhost:6006 | |
env: | |
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN_STORYBOOK_VUE3X }} |