Skip to content

Goodby Vercel! Hello Netlify #1

Goodby Vercel! Hello Netlify

Goodby Vercel! Hello Netlify #1

Workflow file for this run

name: Preview Deployment
on:
push:
branches:
- vercel-preview
pull_request:
types: [opened, synchronize]
concurrency:
group: vercel
cancel-in-progress: false
jobs:
run:
runs-on: ubuntu-latest
env:
REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
APP_ENV: prod
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: "npm"
cache-dependency-path: "**/package-lock.json"
- name: Render Datasheets
run: cd ${GITHUB_WORKSPACE}/scripts/datasheet-rendering;./render-datasheets.sh
- name: Copy Static Files
run: |
mkdir -p static/resources/datasheets static/resources/schematics static/resources/pinouts
find ./content/hardware -type f -name "*-schematics.pdf" -exec cp {} ./static/resources/schematics/ \;
find ./content/hardware -type f -name "*-datasheet.pdf" -exec cp {} ./static/resources/datasheets/ \;
find ./content/hardware -type f -name "*-full-pinout.pdf" -exec cp {} ./static/resources/pinouts/ \;
find ./content/hardware -type f -name "*-pinout.png" -exec cp {} ./static/resources/pinouts/ \;
- name: Gatsby main cache
uses: actions/cache@v4
id: gatsby-cache-folder
with:
path: .cache
key: ${{ runner.os }}-cache-gatsbyV2-vercel-${{ github.sha }}
restore-keys: |
${{ runner.os }}-cache-gatsbyV2-vercel-
- name: Gatsby Public Folder
uses: actions/cache@v4
id: gatsby-public-folder
with:
path: public/
key: ${{ runner.os }}-public-gatsbyV2-vercel-${{ github.sha }}
restore-keys: |
${{ runner.os }}-public-gatsbyV2-vercel-
- run: npm install
- run: npm run build
- name: Deploy preview to Netlify
uses: nwtgck/[email protected]
with:
publish-dir: './public'
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: "Preview Deployment from Github Action"
enable-pull-request-comment: true
enable-commit-comment: false
overwrites-pull-request-comment: true
enable-github-deployment: false
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1