-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (47 loc) · 1.51 KB
/
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
on:
push:
branches:
- main
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
steps:
- name: Tailscale
uses: tailscale/github-action@v2
with:
oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
tags: tag:github-action
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
token: ${{ secrets.PAT_TOKEN }}
- name: Fetch LFS
env:
LFS_ACCESS_KEY: ${{ secrets.LFS_ACCESS_KEY }}
LFS_SECRET_KEY: ${{ secrets.LFS_SECRET_KEY }}
LFS_ENDPOINT: ${{ secrets.LFS_ENDPOINT }}
LFS_DOMAIN: ${{ secrets.LFS_DOMAIN }}
LFS_DOMAIN_IP: ${{ secrets.LFS_DOMAIN_IP }}
run: |
sudo echo "${LFS_DOMAIN_IP} ${LFS_DOMAIN}" | sudo tee -a /etc/hosts
echo -e "[lfs]\n\turl = https://${LFS_ACCESS_KEY}:${LFS_SECRET_KEY}@${LFS_ENDPOINT}" > .lfsconfig
git lfs env
git lfs pull
- name: Setup Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Build Deno
run: deno task build
- name: Publish
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy build --project-name=${{ secrets.CLOUDFLARE_PROJECT_NAME }}