+ We couldn't find the page you were looking for
+Maybe it was moved. Head over to the docs homepage or select another page from the sidebar
+ +diff --git a/.github/workflows/docs-publish.yml b/.github/workflows/docs-publish.yml index 2edf997d..59ef4c20 100644 --- a/.github/workflows/docs-publish.yml +++ b/.github/workflows/docs-publish.yml @@ -2,6 +2,9 @@ name: Docs on: workflow_dispatch: + push: + branches: + - main release: types: [ published ] pull_request: @@ -39,40 +42,64 @@ jobs: run: SPHINXOPTS="-W" make html - name: Upload build artifact - if: github.event_name == 'release' || github.event_name == 'workflow_dispatch' + if: github.event_name != 'pull_request' uses: actions/upload-artifact@v4 with: name: docs-html path: docs/build/html - deploy: - name: Deploy documentation + deploy-test: + name: Deploy to test.dagshub.com needs: build - if: github.event_name == 'release' || github.event_name == 'workflow_dispatch' + if: github.event_name == 'workflow_dispatch' || github.event_name == 'push' runs-on: ubuntu-latest steps: + - uses: actions/checkout@v4 + - name: Download build artifact uses: actions/download-artifact@v4 with: name: docs-html - path: docs-html - - - name: Authenticate with Google - uses: "google-github-actions/auth@v2" - with: - project_id: ${{ secrets.GCS_PROJECT }} - credentials_json: ${{ secrets.GCS_SERVICE_ACCOUNT_ACCESS_KEY }} + path: build/html - - name: Set up Cloud SDK - uses: "google-github-actions/setup-gcloud@v2" + - name: Assemble deploy package + run: | + mkdir -p dist/docs/client + cp -r build/html/. dist/docs/client/ + cp docs/deploy/root-index.html dist/index.html + cp docs/deploy/staticwebapp.config.json dist/staticwebapp.config.json + cp docs/deploy/404.html dist/404.html - - name: Upload to Google Cloud Storage + - name: Deploy to test SWA env: - UPLOAD_PATH: ${{ format('gs://{0}/docs/client', secrets.DOCS_BUCKET) }} - run: gsutil -m rsync -d -r docs-html $UPLOAD_PATH + SWA_DEPLOY_TOKEN: ${{ secrets.SWA_DEPLOY_TOKEN_TEST }} + run: npx --yes @azure/static-web-apps-cli deploy ./dist --deployment-token "$SWA_DEPLOY_TOKEN" --env production + + deploy-prod: + name: Deploy to dagshub.com + needs: build + if: github.event_name == 'release' + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Download build artifact + uses: actions/download-artifact@v4 + with: + name: docs-html + path: build/html + + - name: Assemble deploy package + run: | + mkdir -p dist/docs/client + cp -r build/html/. dist/docs/client/ + cp docs/deploy/root-index.html dist/index.html + cp docs/deploy/staticwebapp.config.json dist/staticwebapp.config.json + cp docs/deploy/404.html dist/404.html - - name: Invalidate CDN Cache + - name: Deploy to prod SWA env: - LOAD_BALANCER: ${{ secrets.LOAD_BALANCER_NAME }} - run: gcloud compute url-maps invalidate-cdn-cache $LOAD_BALANCER --async --path "/docs/client/*" + SWA_DEPLOY_TOKEN: ${{ secrets.SWA_DEPLOY_TOKEN_PROD }} + run: npx --yes @azure/static-web-apps-cli deploy ./dist --deployment-token "$SWA_DEPLOY_TOKEN" --env production diff --git a/docs/deploy/404.html b/docs/deploy/404.html new file mode 100644 index 00000000..4f6383ec --- /dev/null +++ b/docs/deploy/404.html @@ -0,0 +1,2995 @@ + + + +
+ + + + + + + + + + + + + + + + +
+ Maybe it was moved. Head over to the docs homepage or select another page from the sidebar
+ +