-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (44 loc) · 1.44 KB
/
blank.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
name: Build and publish to cloud flare pages
env:
PROJECT_NAME: "graph-algorithm"
ACCOUNT_ID: "438fa90d47933c5f0f94c0bfeefe076d"
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
on:
push:
branches:
- 'main'
jobs:
push-image-to-docker-hub:
name: Build and Publish to Cloud Flare Pages
permissions:
contents: read
deployments: write
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Configures node js
uses: actions/setup-node@v4
with:
node-version: 18
- name : Configures rust and cargo
run: |
curl https://sh.rustup.rs -sSf | sh -s -- -y
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh -s -- -y
- name: Build Wasm Library
run: wasm-pack build --target web
working-directory: ./wasm-lib
- name: Build Website
working-directory: ./website
run: |
npm install
npm run build
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
accountId: ${{ env.ACCOUNT_ID }}
projectName: ${{ env.PROJECT_NAME }}
apiToken: ${{ env.CLOUDFLARE_API_TOKEN }}
directory: ./website/out
# Optional: Change the Wrangler version, allows you to point to a specific version or a tag such as `beta`
wranglerVersion: '3'