fix: generate vercel sdk and fix vercel-promote (#1497) #11
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 @fern-ui/fontawesome-cdn | |
on: | |
push: | |
branches: | |
- main | |
# Cancel previous workflows on previous push so we don't have deploys overwriting eachother here | |
concurrency: | |
group: icons.ferndocs.com | |
cancel-in-progress: true | |
jobs: | |
ignore: | |
runs-on: ubuntu-latest | |
outputs: | |
continue: ${{ steps.ignore.outputs.continue }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 # used for turbo-ignore | |
- name: Install | |
uses: ./.github/actions/install | |
with: | |
run_install: false | |
- name: Ignore unchanged files | |
id: ignore | |
run: set +e; pnpx turbo-ignore @fern-ui/fontawesome-cdn --fallback=HEAD^1; echo "continue=$?" >> $GITHUB_OUTPUT | |
deploy: | |
needs: ignore | |
if: needs.ignore.outputs.continue == 1 | |
runs-on: ubuntu-latest | |
environment: | |
name: Production - icons.ferndocs.com | |
url: ${{ steps.deploy.outputs.deployment_url }} | |
steps: | |
# set the ref to a specific branch so that the deployment is scoped to that branch (instead of a headless ref) | |
- uses: actions/checkout@v4 | |
with: | |
ref: main | |
- name: Install | |
uses: ./.github/actions/install | |
- name: Build & Deploy to Vercel | |
id: deploy | |
run: | | |
pnpm vercel-scripts deploy icons.ferndocs.com --token=${{ secrets.VERCEL_TOKEN }} --environment=production | |
echo "Deployed to $(cat deployment-url.txt) but NOT promoted. Please promote manually." | |
echo "deployment_url=$(cat deployment-url.txt)" >> $GITHUB_OUTPUT |