add vercel specific deployment action (#19) #63
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 GH Pages | |
on: | |
push: | |
tags: | |
- '@caravan/coordinator**' | |
branches: | |
- main | |
permissions: | |
contents: write | |
jobs: | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAGES: true | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Cache Dependencies ... | |
uses: actions/cache@v1 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: ${{ runner.os }}-node- | |
- name: Setup Node.js 20 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Install wasm-pack | |
uses: jetli/[email protected] | |
with: | |
# Optional version of wasm-pack to install(eg. 'v0.9.1', 'latest') | |
version: 'latest' | |
- name: Install dependencies | |
run: npm install | |
# the deploy action can't find the build directory if it's in the | |
# sub directory of the monorepo, even if we reference it correctly | |
# so we have to copy it to the root of the repo. | |
- name: Build | |
# forcing a build to avoid the cache. Probably unnecessary | |
# but useful in case any environment variables change that might | |
# impact the build | |
run: npx turbo run build --force | |
- name: Deploy to GitHub Pages | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages | |
folder: apps/coordinator/build |