-
Notifications
You must be signed in to change notification settings - Fork 5
42 lines (40 loc) · 1.67 KB
/
next.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Vercel Next Deployment
env:
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
ALGOLIA_APPLICATION_ID: ${{ secrets.ALGOLIA_APPLICATION_ID }}
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
environment: vercel-deployments
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18.x'
- name: test
run: |
export SCRAPER_CONFIG=$(cat ./config.next.json | jq -r tostring)
echo $SCRAPER_CONFIG
- name: Install Vercel CLI
run: npm install --global vercel@latest
- run: rm -rf .vercel
- name: Pull Vercel Environment Information
run: vercel pull --yes --git-branch=release/1.0 --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Project Artifacts
run: BASE_URL=https://docs-next.renative.org vercel build
- name: Deploy Project Artifacts to Vercel
run: |
url="$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }})"
vercel alias --token=${{ secrets.VERCEL_TOKEN }} --scope=${{ secrets.VERCEL_ORG_ID }} set "$url" docs-next.renative.org
- name: Update Algolia index
uses: addnab/docker-run-action@v3
with:
image: algolia/docsearch-scraper
options: --env-file=algolia.env
run: pipenv run python -m src.index