Skip to content

feat: APPS-2865 Create EventSeries detail page / slug template to verify gql query data #215

feat: APPS-2865 Create EventSeries detail page / slug template to verify gql query data

feat: APPS-2865 Create EventSeries detail page / slug template to verify gql query data #215

Workflow file for this run

name: Run CI Suite
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ci-${{ github.ref_name=='main' && github.sha || github.ref_name }} # Cancel runs for previous version of PR, but not main (after merge). For hacked ternary, see https://github.com/actions/runner/issues/409#issuecomment-727565588
cancel-in-progress: true
jobs:
eslint:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- uses: ./.github/workflows/setup-workspace
- run: pnpm run lint
- uses: EndBug/add-and-commit@v9
with:
message: "chore: linter autofixes"
default_author: github_actions
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/ftva-website-nuxt/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.
nuxt:
name: Nuxt build / Cypress tests / Netlify deploy
runs-on: ubuntu-latest
timeout-minutes: 40
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/setup-workspace
- name: Cache built static site
uses: actions/cache@v3
id: cache-nuxt3
with:
path: .output/public
key: nuxt3-site-${{ github.sha }}
- name: Sets env vars for PR preview
run: |
echo "ES_ALIAS=${{secrets.ES_ALIAS_TEST}}-deploy-preview-${{github.event.pull_request.number}}" >> $GITHUB_ENV
if: github.ref_name!='main'
- name: Sets env vars for main merge
run: |
echo "ES_ALIAS=${{secrets.ES_ALIAS_TEST}}" >> $GITHUB_ENV
if: github.ref_name=='main'
- run: pnpm run generate
if: steps.cache-nuxt3.outputs.cache-hit != 'true'
env:
CRAFT_ENDPOINT: ${{ secrets.CRAFT_ENDPOINT_TEST }}
S3_BUCKET: "https://static.library.ucla.edu/"
SITEMAP_HOST: "https://test-ftva.library.ucla.edu"
ES_URL: ${{ secrets.ES_URL }}
ESApiKey: ${{ secrets.ESApiKey }}
ES_READ_KEY: ${{ secrets.ES_READ_KEY_TEST }}
ES_WRITE_KEY: ${{ secrets.ES_WRITE_KEY_TEST }}
ES_ALIAS: ${{ env.ES_ALIAS }}
ES_INDEX_PREFIX: ${{secrets.ES_INDEX_PREFIX_TEST}}
- name: Deploy to Netlify (preview)
if: github.ref_name!='main'
uses: nwtgck/actions-netlify@v3.0 #
with:
production-deploy: false
deploy-message: https://github.com/UCLALibrary/ftva-website-nuxt/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: .output/public
fails-without-credentials: true
github-deployment-environment: ${{ github.event_name }}-${{ github.event.number }}
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_TEST_FTVA_SITE_ID }}
- uses: cypress-io/github-action@v3
with:
start: pnpm dlx serve .output/public
install: false
wait-on: http://127.0.0.1:3000
wait-on-timeout: 110
env:
CRAFT_ENDPOINT: ${{ secrets.CRAFT_ENDPOINT_TEST }}
S3_BUCKET: "https://static.library.ucla.edu/"
SITEMAP_HOST: "https://test-ftva.library.ucla.edu"
ES_URL: ${{ secrets.ES_URL }}
ESApiKey: ${{ secrets.ESApiKey }}
ES_READ_KEY: ${{ secrets.ES_READ_KEY_TEST }}
ES_WRITE_KEY: ${{ secrets.ES_WRITE_KEY_TEST }}
ES_INDEX_PREFIX: ${{secrets.ES_INDEX_PREFIX_TEST}}
- name: Deploy to Netlify (test)
if: github.ref_name=='main'
uses: nwtgck/actions-netlify@v2 #
with:
production-deploy: true
deploy-message: https://github.com/UCLALibrary/ftva-website-nuxt/commit/${{ github.sha }}
github-token: ${{ secrets.GITHUB_TOKEN }}
publish-dir: .output/public
fails-without-credentials: true
github-deployment-environment: production
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_TEST_FTVA_SITE_ID }}