-
Notifications
You must be signed in to change notification settings - Fork 1
33 lines (32 loc) · 1.01 KB
/
pages-deployment.yaml
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
on: [push]
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
name: Deploy to Cloudflare Pages
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install
run: npm install
# - name: Test
# run: npm test
- name: Build
run: npm run ci
- name: Publish
uses: cloudflare/pages-action@1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: 'benhalverson' # e.g. 'my-project'
# directory: YOUR_DIRECTORY_OF_STATIC_ASSETS # e.g. 'dist'
directory: dist/cloudflare
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
- name: Outputs
run: |
echo "ID: ${{ steps.publish.outputs.id }}"
echo "URL: ${{ steps.publish.outputs.url }}"
echo "Environment: ${{ steps.publish.outputs.environment }}"
echo "Alias: ${{ steps.publish.outputs.alias }}"