make post underlines pretty #39
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: Publish Site to Vercel | |
on: | |
push: | |
branches: [main] | |
paths: ['_site/**'] | |
pull_request: | |
branches: [main] | |
paths: ['_site/**'] | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
vercel-deploy: | |
runs-on: ${{ matrix.os }} | |
environment: | |
name: vercel-production | |
url: https://prncevince.io | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest] | |
r: ['release'] | |
r-repo: ['https://cloud.r-project.org'] | |
# Only runs PR jobs concurrently & uses same group as other vercel- jobs | |
# PR jobs run in their own branch & do not deploy anything - so we assume they can run concurrently | |
concurrency: | |
group: vercel-${{ github.event_name != 'pull_request' || github.run_id }} | |
env: | |
RENV_CONFIG_REPOS_OVERRIDE: ${{ matrix.r-repo }} | |
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install pnpm | |
run: brew install pnpm | |
- name: Install Node dependencies | |
run: pnpm i | |
- name: Deploy site to Vercel 🚀 | |
if: github.event_name != 'pull_request' | |
run: | | |
pnpm vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | |
pnpm vercel deploy _site --prod --token=${{ secrets.VERCEL_TOKEN }} | |