-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (51 loc) · 1.26 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
55
56
57
58
name: "Deploy"
on:
push:
branches: [ "main" ]
# Allows to run this workflow manually.
workflow_dispatch:
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: "Setup Deno"
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: "Build with Deno"
run: |
deno task build
- name: "Upload artifacts"
uses: actions/upload-artifact@v3
with:
name: pages
path: dist
retention-days: 1
if-no-files-found: error
deploy:
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
steps:
- name: "Download artifacts"
uses: actions/download-artifact@v3
with:
name: pages
path: dist
- name: "Publish to Cloudflare Pages"
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_PAGES_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: keyring
directory: dist
gitHubToken: ${{ secrets.GITHUB_TOKEN }}