-
Notifications
You must be signed in to change notification settings - Fork 1.3k
47 lines (41 loc) · 1.33 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
44
45
46
47
# a workflow that runs after the "Qwik CI" workflow is successful
# and deploys the documentation to CloudFlare Pages.
name: Deploy Docs
on:
workflow_run:
workflows: ['Qwik CI']
types:
- completed
permissions:
actions: read
deployments: write
contents: read
pull-requests: write
jobs:
deploy:
name: Cloudflare Pages Deployment
if: >
github.repository == 'QwikDev/qwik' &&
github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download docs artifact
uses: actions/download-artifact@v4
id: download-artifact
with:
name: artifact-docs
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}
# This will download both dist/ and server/
path: packages/docs
# not the official version, so be careful when updating
- name: Deploy to Cloudflare Pages
uses: AdrianGonz97/refined-cf-pages-action@6c0d47ff7c97c48fa702b6d9f71f7e3a7c30c7d8
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: 'qwik-docs'
directory: packages/docs/dist
githubToken: ${{ secrets.GITHUB_TOKEN }}