-
Notifications
You must be signed in to change notification settings - Fork 40
43 lines (37 loc) · 1.2 KB
/
deploy-docs.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
# Simple workflow for deploying static content to Cloudflare Pages
name: Deploy Docs
on:
# Runs on pushes targeting the default branch
push:
branches: ["master"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
# Single deploy job since we're just deploying
deploy:
runs-on: ubuntu-latest
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
deployments: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get Environment Variables
id: dotenv
uses: falti/[email protected]
- name: Build Docs
run: |
yarn install
yarn build
working-directory: ./docs/
- name: Deploy Docs
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: bebop-docs
directory: ${{github.workspace}}/docs/dist
# Optional: Enable this if you want to have GitHub Deployments triggered
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
branch: master