-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (30 loc) · 1.16 KB
/
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
name: Build Documentation
on: workflow_dispatch
jobs:
build-docs:
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
deployments: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to GH Packages
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Pull builder image
run: docker pull ghcr.io/norvica/docs:v0.4.0
- name: Build Documentation
run: |
docker run --rm -v $(pwd)/docs/content:/app/content -v $(pwd)/docs/config/_default:/app/config/_default -v $(pwd)/docs/public:/app/public -e HUGO_ENVIRONMENT=production -e HUGO_ENV=production ghcr.io/norvica/docs:v0.4.0 npm run build -- --gc --minify --baseURL "https://router.norvica.dev"
- name: Publish
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ secrets.CLOUDFLARE_PROJECT_NAME }}
directory: $(pwd)/docs/public