Try to deploy to Vercel #17
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: "Docs" | |
on: ["push"] | |
jobs: | |
deploy: | |
name: "Build" | |
runs-on: "ubuntu-latest" | |
env: | |
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | |
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | |
EARTHLY_TOKEN: ${{ secrets.EARTHLY_TOKEN }} | |
concurrency: | |
group: "docs" | |
cancel-in-progress: false | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v3" | |
- name: "Set up earthly" | |
uses: "earthly/actions-setup@v1" | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
version: "^0.7.14" | |
- name: "Log in to Docker" | |
run: docker login --username "$DOCKERHUB_USERNAME" --password "$DOCKERHUB_TOKEN" | |
- name: "Build documentation" | |
run: earthly --ci --push +build-docs | |
- name: "Set up Node.js" | |
uses: "actions/setup-node@v3" | |
with: | |
node-version: "lts" | |
- name: "Deploy to Vercel" | |
uses: "amondnet/vercel-action@v25" | |
with: | |
vercel-token: ${{ secrets.VERCEL_TOKEN }} | |
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} | |
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID}} | |
working-directory: ./docs/.vitepress/dist | |
vercel-args: ${{ github.ref == 'refs/heads/trunk' && '--prod' || '' }} |