docs: improvements to building and docs (#5234)

This commit is contained in:
Henrique Dias 2025-06-29 09:28:39 +02:00 committed by GitHub
parent 5a07291306
commit 2d1a82b73f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 122 additions and 170 deletions

View file

@ -1,7 +1,10 @@
name: Build Site Image
name: Build Site
on:
pull_request:
paths:
- 'www'
- '*.md'
jobs:
build:
@ -13,11 +16,5 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile.site
platforms: linux/amd64,linux/arm64
push: false
- name: Build site
run: make site

View file

@ -1,4 +1,4 @@
name: Build and Push Site Image
name: Build and Deploy Site
on:
push:
@ -6,39 +6,6 @@ on:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile.site
push: true
platforms: linux/amd64,linux/arm64
tags: |
filebrowser/site:latest
ghcr.io/filebrowser/site:latest
deploy:
permissions:
contents: read
@ -61,5 +28,5 @@ jobs:
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy site/public/site --project-name=${{ secrets.CLOUDFLARE_PROJECT_NAME }}
command: pages deploy www/public --project-name=${{ secrets.CLOUDFLARE_PROJECT_NAME }}
gitHubToken: ${{ secrets.GITHUB_TOKEN }}