Update node.js.yml

This commit is contained in:
DrMint 2022-03-06 02:01:49 +01:00 committed by GitHub
parent e4def9268a
commit d502655dff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -26,11 +26,19 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Create .env.local file
env:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
NEXT_PUBLIC_URL_CMS: ${{ secrets.NEXT_PUBLIC_URL_CMS }}
NEXT_PUBLIC_URL_IMG: ${{ secrets.NEXT_PUBLIC_URL_IMG }}
NEXT_PUBLIC_URL_SELF: ${{ secrets.NEXT_PUBLIC_URL_SELF }}
URL_GRAPHQL: ${{ secrets.URL_GRAPHQL }}
run: |
touch .env.local
echo ACCESS_TOKEN=${{ secrets.ACCESS_TOKEN }} >> .env.local
echo NEXT_PUBLIC_URL_CMS=${{ secrets.NEXT_PUBLIC_URL_CMS }} >> .env.local
echo NEXT_PUBLIC_URL_IMG=${{ secrets.NEXT_PUBLIC_URL_IMG }} >> .env.local
echo NEXT_PUBLIC_URL_SELF=${{ secrets.NEXT_PUBLIC_URL_SELF }} >> .env.local
echo URL_GRAPHQL=${{ secrets.URL_GRAPHQL }} >> .env.local
- run: npm ci
- run: npm run build --if-present