-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (45 loc) · 1.2 KB
/
publish.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
on:
push:
branches:
- main
repository_dispatch:
types:
- webhook
jobs:
publish:
runs-on: ubuntu-latest
name: Publish to Cloudflare Pages
environment: Production
permissions:
contents: read
deployments: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Node dependencies
run: yarn install --frozen-lockfile
- name: Install Gatsby CLI
run: npm install -g [email protected]
- name: Delete content directory
run: rm -rf content
- name: Checkout
uses: actions/checkout@v3
with:
repository: AlgoWiki/AlgoWiki
path: content
- name: Build
run: gatsby build
- name: Verify build
run: ls -la public
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: a95bfbe5faab2e985d45b5533c8d91dc
projectName: wiki-algo-is
directory: public
gitHubToken: ${{ secrets.GITHUB_TOKEN }}