Skip to content

Commit

Permalink
increased timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
andromaqui committed Jun 14, 2024
1 parent b59ec74 commit 8e258a4
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/preview-env-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:
- name: Build
env:
NODE_OPTIONS: --max_old_space_size=8192
DOCS_SITE_URL: https://preview.docs.camunda.cloud
DOCS_SITE_BASE_URL: "/pr-3928/"
DOCS_SITE_URL: ${{ steps.secrets.outputs.PREVIEW_ENV_BUCKET_NAME }}
DOCS_SITE_BASE_URL: ${{ github.event.number }}
run: npm run build

- name: Authenticate with Google Cloud
Expand All @@ -50,7 +50,7 @@ jobs:
with:
step: start
token: "${{ github.token }}"
env: camunda-docs #name of repo
env: camunda-docs
ref: ${{ github.event.pull_request.head.sha }}

- name: Upload files to google bucket
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/preview-env-teardown.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
name: preview-env-teardown
on:
pull_request:
types: [unlabeled, closed]

jobs:
deploy-preview:
if: github.event.label.name == 'deploy' || (github.event.action == 'closed' && contains( github.event.pull_request.labels.*.name, 'deploy') )
runs-on: ubuntu-22.04
timeout-minutes: 20
name: teardown-preview-env
Expand Down Expand Up @@ -34,12 +32,20 @@ jobs:
with:
version: ">= 363.0.0"

- name: Set env
run: |
echo "BUCKET=${GITHUB_REPOSITORY#*\/}" >> $GITHUB_ENV
- name: Test
run: echo $REPOSITORY_NAME

- name: Remove files from Google bucket
env:
BUCKET_NAME: ${{ steps.secrets.outputs.PREVIEW_ENV_BUCKET_NAME }}
BUCKET_NAME: gs://${{ steps.secrets.outputs.PREVIEW_ENV_BUCKET_NAME }}
run: |
touch dummy.txt
gcloud config set pass_credentials_to_gsutil true
gsutil -m rm -r gs://$BUCKET_NAME/pr-${{ github.event.number }}/
gsutil -m c dummy.txt $BUCKET_NAME/pr-${{ github.event.number }}/
- name: Update comment
uses: peter-evans/create-or-update-comment@v4
Expand Down
13 changes: 11 additions & 2 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,23 @@ const versionedLinks = require("./src/mdx/versionedLinks");
const { unsupportedVersions } = require("./src/versions");

const latestVersion = require("./src/versions").versionMappings[0].docsVersion;
// Read url and baseUrl from environment variables
const siteUrlEnv = process.env.DOCS_SITE_URL || "https://docs.camunda.io";
const siteBaseUrlEnv = process.env.DOCS_SITE_BASE_URL || "/";
const siteUrl = siteUrlEnv.startsWith("https://")
? siteUrlEnv
: "https://${siteUrlEnv}";
const siteBaseUrl = /^\d+$/.test(siteBaseUrlEnv)
? "/pr-${siteBaseUrlEnv}/"
: "/";

module.exports = {
title: "Camunda 8 Docs",
tagline: "Documentation for all components of Camunda 8",
// url: "https://camunda-cloud.github.io",
url: process.env.DOCS_SITE_URL || "https://docs.camunda.io",
url: siteUrl,
// baseUrl: "/camunda-cloud-documentation/",
baseUrl: process.env.DOCS_SITE_BASE_URL || "/",
baseUrl: siteBaseUrl,
customFields: {
canonicalUrlRoot: "https://docs.camunda.io",
},
Expand Down

0 comments on commit 8e258a4

Please sign in to comment.