generated from google/eleventy-high-performance-blog
-
-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (35 loc) · 1.09 KB
/
main.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
name: Publish to Cloudflare pages
on:
push:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
repository_dispatch:
types: [scheduled_post]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Read .nvmrc
id: node_version
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ steps.node_version.outputs.NODE_VERSION }}
- run: npm install
- run: npm run build
- name: Cloudflare Pages GitHub Action
uses: cloudflare/[email protected]
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: '46c391370bbf0010bf0d5f4bbc237435'
projectName: 'blog'
directory: './_site'
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
- name: Upload deployment artifact
uses: actions/upload-artifact@v4
with:
name: deployment
path: ./_site