Upgrade node version #636
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 🚧 Push to Feature Branch | |
on: | |
push: | |
branches: | |
- task/[0-9]+-* | |
- bug/[0-9]+-* | |
jobs: | |
lint: | |
name: 🔎 Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup node env | |
uses: actions/[email protected] | |
with: | |
node-version: 20.x | |
- name: Install dependencies | |
run: npm ci | |
- name: Run lint | |
run: npm run lint | |
test: | |
name: 🧪 Unit Tests | |
runs-on: ubuntu-latest | |
needs: | |
- lint | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup node env | |
uses: actions/[email protected] | |
with: | |
node-version: 20.x | |
- name: Install dependencies | |
run: npm ci | |
- name: Run tests | |
run: npm run test | |
deploy-preview: | |
name: Preview Deploy | |
needs: | |
- lint | |
runs-on: ubuntu-latest | |
environment: development | |
env: | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NEXT_PUBLIC_CARTO_USERNAME: ${{ secrets.CARTO_USERNAME }} | |
NEXT_PUBLIC_CARTO_API_KEY: ${{ secrets.CARTO_API_KEY }} | |
NEXT_PUBLIC_MAPBOX_TOKEN: ${{ secrets.MAPBOX_TOKEN }} | |
NEXT_PUBLIC_DO_SPACE_URL: ${{ secrets.DO_SPACE_URL }} | |
SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENDGRID_API_KEY: ${{ secrets.SENDGRID_API_KEY }} | |
FROM_EDDE_EMAIL: ${{ secrets.FROM_EDDE_EMAIL }} | |
TO_EDDE_EMAIL: ${{ secrets.TO_EDDE_EMAIL }} | |
NEWSLETTER_ENDPOINT: ${{ secrets.NEWSLETTER_ENDPOINT }} | |
NEWSLETTER_LIST_ID: ${{secrets.NEWSLETTER_LIST_ID}} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup node env | |
uses: actions/[email protected] | |
with: | |
node-version: 20.x | |
- name: Install dependencies | |
run: npm ci | |
- name: Deploy Preview | |
run: | | |
echo "FROM_EDDE_EMAIL=$FROM_EDDE_EMAIL" >> .env | |
echo "TO_EDDE_EMAIL=$TO_EDDE_EMAIL" >> .env | |
echo "SENDGRID_API_KEY=$SENDGRID_API_KEY" >> .env | |
echo "NEWSLETTER_ENDPOINT=$NEWSLETTER_ENDPOINT" >> .env | |
echo "NEWSLETTER_LIST_ID=$NEWSLETTER_LIST_ID" >> .env | |
DEPLOY_ALIAS=${GITHUB_SHA:0:6} | |
npx netlify-cli deploy --build --alias $DEPLOY_ALIAS |