Post: Remix Docs VSCode Extension #31
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: 🚀 Deploy | |
# automatically trigger the workflow on push to any branch and pull requests | |
on: | |
push: | |
branches: | |
- 'main' | |
pull_request: | |
# allows us to manually trigger the workflow from GitHub's UI | |
workflow_dispatch: | |
# cancel any previous runs that are still in progress | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
# sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
format: | |
name: ✏️ Prettier | |
runs-on: ubuntu-latest | |
steps: | |
- name: ⬇️ Checkout repo | |
uses: actions/checkout@v4 | |
- name: ⎔ Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: 📦 Setup pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
run_install: false | |
- name: 📁 Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- name: ♻️ Setup pnpm cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: 📥 Install deps | |
run: pnpm install | |
- name: 💅 Format | |
run: pnpm format | |
lint: | |
name: ⬣ ESLint | |
runs-on: ubuntu-latest | |
steps: | |
- name: ⬇️ Checkout repo | |
uses: actions/checkout@v4 | |
- name: ⎔ Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: 📦 Setup pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
run_install: false | |
- name: 📁 Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- name: ♻️ Setup pnpm cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: 📥 Install deps | |
run: pnpm install | |
- name: 🔬 Lint | |
run: pnpm lint | |
typecheck: | |
name: ʦ TypeScript | |
runs-on: ubuntu-latest | |
steps: | |
- name: ⬇️ Checkout repo | |
uses: actions/checkout@v4 | |
- name: ⎔ Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: 📦 Setup pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
run_install: false | |
- name: 📁 Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- name: ♻️ Setup pnpm cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: 📥 Install deps | |
run: pnpm install | |
- name: 🛠 Generate Prisma Client | |
run: pnpm dlx prisma generate | |
- name: 🔎 Type check | |
run: pnpm typecheck | |
build: | |
name: '⚙️ Build' | |
runs-on: ubuntu-latest | |
needs: [format, lint, typecheck] | |
steps: | |
- name: ⬇️ Checkout repo | |
uses: actions/checkout@v4 | |
- name: ⎔ Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Setup Pages | |
uses: actions/configure-pages@v4 | |
- name: 📦 Setup pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
run_install: false | |
- name: 📁 Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- name: ♻️ Setup pnpm cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: 📥 Install deps | |
run: pnpm install | |
- name: 🛠 Build | |
run: pnpm build | |
- name: 🏗️ Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ./build/client | |
deploy: | |
name: 🚀 Deploy | |
runs-on: ubuntu-latest | |
needs: build | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: 🌎 Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |