mirror of
https://github.com/xtool-org/xtool.git
synced 2026-11-21 10:45:53 +03:00
Compare commits
3 Commits
@@ -1,29 +0,0 @@
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
jobs:
|
||||
deploy:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: macos-15
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v5
|
||||
- name: Build DocC
|
||||
run: |
|
||||
./scripts/build-docs.sh
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: 'docs'
|
||||
- id: deployment
|
||||
name: Deploy to GitHub Pages
|
||||
uses: actions/deploy-pages@v4
|
||||
@@ -12,4 +12,3 @@ DerivedData/
|
||||
.docc-build
|
||||
|
||||
/openapi
|
||||
/docs
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
/docs
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
rm -rf docs
|
||||
|
||||
swift package --allow-writing-to-package-directory \
|
||||
@@ -0,0 +1,37 @@
|
||||
[build]
|
||||
# by setting a custom base directory, we prevent Netlify from running
|
||||
# `swift build` in the root directory, which builds more targets than
|
||||
# we need.
|
||||
base = "Netlify/"
|
||||
publish = "docs/"
|
||||
command = "./build.sh"
|
||||
environment = { SWIFT_VERSION = "6.1" }
|
||||
ignore = "git -C .. diff --quiet $CACHED_COMMIT_REF $COMMIT_REF -- Sources/XToolDocs Netlify netlify.toml"
|
||||
|
||||
[[redirects]]
|
||||
from = "/"
|
||||
to = "/documentation/xtooldocs/"
|
||||
status = 302
|
||||
force = true
|
||||
|
||||
[[redirects]]
|
||||
from = "/documentation"
|
||||
to = "/documentation/xtooldocs/"
|
||||
status = 302
|
||||
force = true
|
||||
|
||||
[[redirects]]
|
||||
from = "/tutorials"
|
||||
to = "/tutorials/toc"
|
||||
status = 302
|
||||
force = true
|
||||
|
||||
[[redirects]]
|
||||
from = "/documentation/xtool/*"
|
||||
to = "/documentation/xtooldocs/:splat"
|
||||
status = 302
|
||||
|
||||
[[redirects]]
|
||||
from = "/tutorials/xtool/*"
|
||||
to = "/tutorials/xtooldocs/:splat"
|
||||
status = 302
|
||||
Reference in New Issue
Block a user