Skip to content

Minimalist site appearance #29

Minimalist site appearance

Minimalist site appearance #29

name: PR Checker with Secrets
on:
pull_request:
branches:
- master
pull_request_target:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
if:
(github.event_name == 'pull_request_target' && github.actor == 'dependabot[bot]') ||
(github.event_name != 'pull_request_target' && github.actor != 'dependabot[bot]')
steps:
- uses: actions/checkout@v4
- name: Read .nvmrc
id: node_version
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: ${{ steps.node_version.outputs.NODE_VERSION }}
- run: yarn install --frozen-lockfile
- run: yarn build
env:
CONTENTFUL_ACCESS_TOKEN: ${{secrets.CONTENTFUL_ACCESS_TOKEN}}
CONTENTFUL_SPACE_ID: ${{secrets.CONTENTFUL_SPACE_ID}}
test:
runs-on: ubuntu-latest
if:
(github.event_name == 'pull_request_target' && github.actor == 'dependabot[bot]') ||
(github.event_name != 'pull_request_target' && github.actor != 'dependabot[bot]')
steps:
- uses: actions/checkout@v4
- name: Read .nvmrc
id: node_version
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: ${{ steps.node_version.outputs.NODE_VERSION }}
- run: yarn install --frozen-lockfile
- run: yarn test:ci
env:
CONTENTFUL_ACCESS_TOKEN: ${{secrets.CONTENTFUL_ACCESS_TOKEN}}
CONTENTFUL_SPACE_ID: ${{secrets.CONTENTFUL_SPACE_ID}}