-
Notifications
You must be signed in to change notification settings - Fork 9
68 lines (61 loc) · 1.72 KB
/
build-and-deploy.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Deploy Site
on:
push:
paths:
- .github/workflows/build-and-deploy.yml
- "docs/**"
- "src/**"
- "static/**"
- "**.js"
- "**.json"
- "**.lock"
pull_request:
paths:
- .github/workflows/build-and-deploy.yml
- "docs/**"
- "src/**"
- "static/**"
- "**.js"
- "**.json"
- "**.lock"
jobs:
build:
name: Deploy Site
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 19
cache: yarn
- name: Install Dependencies
run: yarn install
- name: Build
run: yarn build
- name: Publish
uses: cloudflare/pages-action@v1
if: |
github.ref == 'refs/heads/master' ||
github.ref == 'refs/heads/next'
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: recyclarr-wiki
directory: build
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
- name: Algolia Crawl
uses: algolia/[email protected]
if: github.ref == 'refs/heads/master'
with:
crawler-user-id: ${{ secrets.CRAWLER_USER_ID }}
crawler-api-key: ${{ secrets.CRAWLER_API_KEY }}
algolia-app-id: ${{ secrets.ALGOLIA_APP_ID }}
algolia-api-key: ${{ secrets.ALGOLIA_API_KEY }}
site-url: 'https://recyclarr.dev'
crawler-name: recyclarr