Skip to content

fix(deps): bump postcss from 8.4.47 to 8.4.49 #532

fix(deps): bump postcss from 8.4.47 to 8.4.49

fix(deps): bump postcss from 8.4.47 to 8.4.49 #532

Workflow file for this run

name: Check pull request
on:
pull_request:
permissions:
pull-requests: write
contents: read
env:
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
NODE_VERSION: 20
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
clean:
name: Clean contribution if not authorized
runs-on: ubuntu-latest
outputs:
authorized: ${{ steps.emit.outputs.result }}
steps:
- name: Emit output
uses: actions/github-script@v7
id: emit
with:
github-token: ${{ github.token }}
script: |
const author = process.env['PR_AUTHOR']
let result
core.info(`Pull request author is ${author}`)
if (author === 'MatteoH2O1999' || author === 'dependabot[bot]'){
core.info('Author is allowed to contribute')
result = true
} else {
core.info('Author is not allowed to contribute')
core.info('Closing PR...')
result = false
}
return result
- name: Clean contribution
if: ${{ steps.emit.outputs.result == 'false' }}
uses: dessant/repo-lockdown@v4
with:
pr-comment: This repository is a personal website and as such it does not accept pull requests.
log-output: true
test:
name: Test website
runs-on: ubuntu-latest
if: ${{ needs.clean.outputs.authorized == 'true' }}
needs: clean
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install production and development dependencies
run: npm ci
- name: Run tests
run: npm run test-ci
env:
FORCE_COLOR: 3
build:
name: Test build website
runs-on: ubuntu-latest
needs: clean
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install production dependencies
run: npm ci --omit=dev
- name: Test build with Nuxt
run: npm run generate
- name: Upload generated pages
uses: actions/upload-artifact@v4
with:
path: dist/
name: pages
retention-days: 1
screenshots:
name: Generate screenshots
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-13]
fail-fast: false
needs: [build, test]
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Download generated pages
uses: actions/download-artifact@v4
with:
name: pages
path: dist
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install production and development dependencies
run: npm ci
- name: Generate screenshots
id: screenshots
run: npm run screenshots
env:
TOKEN: ${{ github.token }}
- name: Upload screenshots
if: ${{ steps.screenshots.outputs.screenshots != '' }}
uses: actions/upload-artifact@v4
with:
retention-days: 1
name: ${{ steps.screenshots.outputs.artifact_name }}
path: ${{ steps.screenshots.outputs.screenshots }}
pr_comment:
name: Upload screenshots and create PR comment
runs-on: ubuntu-latest
needs: screenshots
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Download screenshots
uses: actions/download-artifact@v4
with:
path: screenshots
- name: Remove pages artifact
run: rm -rf screenshots/pages
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install production and development dependencies
run: npm ci
- name: Upload screenshots and create comment
run: npm run comment
env:
TOKEN: ${{ github.token }}