Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lint after gatsby build #475

Merged
merged 1 commit into from
Nov 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 17 additions & 13 deletions .github/workflows/build_and_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,6 @@ jobs:

- run: npm ci --prefer-offline

- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
eslintrc:
- '.eslint*'

# run eslint on all files if eslintrc changes
- name: Run eslint on changed files
uses: sibiraj-s/action-eslint@v3
with:
all-files: ${{ steps.filter.outputs.eslintrc == 'true' }}

- run: npm run build -- ${{ github.ref_name == 'main' && '--prefix-paths' || '' }}
env:
NODE_ENV: production
Expand All @@ -83,20 +70,37 @@ jobs:
path: |
.cache-github-api
key: gatsby-build-github-queries-${{ steps.date.outputs.month }}-${{ steps.date.outputs.day }}-${{ github.run_id }}-${{ github.run_attempt }}

- run: npm run test:int
env:
CI: true
PATH_PREFIX: "${{ github.ref_name == 'main' && 'extensions' || '' }}"
PATH_PREFIX_FLAG: "${{ github.ref_name == 'main' && '--prefix-paths' || '' }}"

- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
eslintrc:
- '.eslint*'

# run eslint on all files if eslintrc changes
- name: Run eslint on changed files
uses: sibiraj-s/action-eslint@v3
with:
all-files: ${{ steps.filter.outputs.eslintrc == 'true' }}

- name: Store PR id
if: "github.event_name == 'pull_request'"
run: echo ${{ github.event.number }} > ./public/pr-id.txt

- name: Publishing directory for site deployment
uses: actions/upload-artifact@v3
with:
name: site
path: ./public
retention-days: 3

deploy:
# Only try and deploy on merged code
if: "github.repository == 'quarkusio/extensions' && github.ref_name == 'main' && (github.event_name == 'push' || github.event_name == 'schedule')"
Expand Down
Loading