Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/improvements.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'Docs - Improvements and corrections'
description: Suggest changes to improve or correct the existing Upsun Flex or Fixed content
description: Suggest changes to improve or correct the existing Upsun Fixed content
labels:
- ungroomed
body:
Expand All @@ -25,8 +25,8 @@ body:
- type: textarea
attributes:
label: Where should the changes be made?
description: Add the links to the Upsun Flex and/or Upsun Fixed pages you think should be updated.
placeholder: https://docs.upsun.com, https://fixed.docs.upsun.com/
description: Add the links to the Upsun Fixed pages you think should be updated.
placeholder: https://fixed.docs.upsun.com/
validations:
required: true

Expand Down
2 changes: 1 addition & 1 deletion .github/actions/redirection-verification/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ inputs:
required: true
base_environment_url:
description: 'aka value of {default}'
required: true
required: false
redirection_token:
description: 'Redirectionio API token'
required: true
Expand Down
4 changes: 3 additions & 1 deletion .github/actions/redirection-verification/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ axios.defaults.baseURL = core.getInput('environment_url')
//axios.defaults.baseURL = 'https://httpstat.us/random/200,500-504,500-504,500-504'
const retries = Number(core.getInput('number_retries'))
const retrySleep = Number(core.getInput('retry_sleep'))
const defaultRoute = core.getInput('base_environment_url')
const environmentUrl = core.getInput('environment_url')
const baseEnvironmentUrl = core.getInput('base_environment_url')
const defaultRoute = baseEnvironmentUrl || environmentUrl
//const retries = Number('100')
function sleep(ms) {
return new Promise((resolve) => {
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/generate-cli-commands-page.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ env:
BRANCH_TITLE: cli-commands-doc-page
DEFAULT_BRANCH: "main"
PLATFORMSH_CLI_DOC_PATH: "sites/platform/src/administration/cli/reference.md"
UPSUN_CLI_DOC_PATH: "sites/upsun/src/administration/cli/reference.md"
permissions:
contents: write

Expand Down Expand Up @@ -48,8 +47,6 @@ jobs:
# Adding CLI Commands specific page
echo "Generating Platform.sh CLI doc page"
./shared/scripts/gen-cli-docs.sh ${{ env.PLATFORMSH_CLI_DOC_PATH }} platform
echo "Generating Upsun CLI doc page"
./shared/scripts/gen-cli-docs.sh ${{ env.UPSUN_CLI_DOC_PATH }} upsun

- name: Create Pull Request
id: cpr
Expand All @@ -62,14 +59,12 @@ jobs:
signoff: false
add-paths: |
${{ env.PLATFORMSH_CLI_DOC_PATH }}
${{ env.UPSUN_CLI_DOC_PATH }}
branch: ${{ env.BRANCH_TITLE }}
delete-branch: false
title: '[CLI-BOT] Update on doc pages for CLI commands'
body: |
Some changes occurs on the CLI Commands doc page, that is automatically generated from:
- `platform list --format=md`
- `upsun list --format=md`
labels: |
report
automated pr
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/linting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
site: ['platform', 'upsun']
site: ['platform']
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
site: ['platform', 'upsun']
site: ['platform']
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -63,6 +63,7 @@ jobs:
version: 3.0.7
fail_on_error: true
reporter: github-check
filter_mode: nofilter
files: sites/${{ matrix.site }}/src
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
2 changes: 1 addition & 1 deletion .github/workflows/pr-check-links.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
site: ['platform', 'upsun']
site: ['platform']
# Run only for PRs from default repo and approved PRs from forks
if: github.event.pull_request.head.repo.id == 21975579 || contains(github.event.pull_request.labels.*.name, 'build-fork')
steps:
Expand Down
42 changes: 5 additions & 37 deletions .github/workflows/pr-url-and-dependent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ env:
PLATFORMSH_CLI_NO_INTERACTION: 1
PLATFORM_PROJECT: ${{ vars.PROJECT_ID }}
PLATFORMSH_CLI_DEFAULT_TIMEOUT: 60 # Increase timeout for CLI commands
UPSUN_DOCS_PREFIX: "https://docs.upsun.com"
PRURLJOBNAME: 'Get PR URL'

jobs:
Expand Down Expand Up @@ -77,7 +76,6 @@ jobs:
if: needs.get_info_on_pr.outputs.continuetests == 'true'
outputs:
pr_url: ${{ steps.get_env_url.outputs.pr_url }}
pr_url_upsun: ${{ steps.get_env_url.outputs.pr_url_upsun }}
pr_url_status: ${{ steps.get_env_url.outputs.env_status }}

steps:
Expand Down Expand Up @@ -182,7 +180,6 @@ jobs:
HEADSHA: ${{ needs.get_info_on_pr.outputs.headsha }}
PRNUM: ${{ needs.get_info_on_pr.outputs.prnum }}
ENV_URL: ${{ needs.get_pr_url.outputs.pr_url }}
UPSUN_ENV_URL: ${{ needs.get_pr_url.outputs.pr_url_upsun }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -202,7 +199,6 @@ jobs:
id: get-files
run: |
files_platform=()
files_upsun=()
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do

# Rewrite all Markdown files in the source to be links in the final environment
Expand All @@ -220,20 +216,6 @@ jobs:
files_platform+=("$ENV_URL$page")
fi

if [[ $file = "sites/upsun/src/"*".md" ]]; then

# Remove file extension
page=${file/.md/.html}

# Remove initial directory
page=${page/"sites/upsun/src/"/}

# Shift index pages up a level
page=${page/"/_index.html"/".html"}

files_upsun+=("$UPSUN_ENV_URL$page")
fi

done

# If there are changed files for Upsun Fixed, return a list
Expand All @@ -245,33 +227,22 @@ jobs:
echo changed_files_platform="" >> $GITHUB_OUTPUT
fi

# If there are changed files for Upsun, return a list
# Using "\n" here creates problems in passing data to the next step, so replace there instead
if (( ${#files_upsun[@]} != 0 )); then
echo $(printf "||%s" "${files_upsun[@]}")
echo changed_files_upsun=$(printf "||%s" "${files_upsun[@]}") >> $GITHUB_OUTPUT
else
echo changed_files_upsun="" >> $GITHUB_OUTPUT
fi

# If there are changed pages, create a comment with a checklist
- name: Comment with links
if: steps.get-files.outputs.changed_files_platform != '' || steps.get-files.outputs.changed_files_upsun != ''
if: steps.get-files.outputs.changed_files_platform != ''
env:
PAGES_PLATFORM: ${{ steps.get-files.outputs.changed_files_platform }}
PAGES_UPSUN: ${{ steps.get-files.outputs.changed_files_upsun }}
run: |
echo -e "Your Upsun Fixed environment has successfully deployed. :rocket:\n\nSee the changed pages:\n\n<details>\n<summary>Upsun Fixed docs</summary><br/>\n\n${PAGES_PLATFORM//||/'\n- [ ] '}\n\n</details>\n\n<details>\n<summary>Upsun docs</summary><br/>\n\n${PAGES_UPSUN//||/'\n- [ ] '}" > pr_comment.txt
echo -e "Your Upsun Fixed environment has successfully deployed. :rocket:\n\nSee the changed pages:\n\n<details>\n<summary>Upsun Fixed docs</summary><br/>\n\n${PAGES_PLATFORM//||/'\n- [ ] '}\n\n</details>" > pr_comment.txt

# If there are no changed pages, create a comment
# with a link to general URL
- name: Comment without links
if: steps.get-files.outputs.changed_files_platform == '' && steps.get-files.outputs.changed_files_upsun == ''
if: steps.get-files.outputs.changed_files_platform == ''
env:
ENV_URL: ${{ needs.get_pr_url.outputs.pr_url }}
UPSUN_ENV_URL: ${{ needs.get_pr_url.outputs.pr_url_upsun }}
run: |
echo -e "Your Upsun Fixed environment has successfully deployed. :rocket:\n\nSee the site:\n\n- [Upsun Fixed docs]($ENV_URL)\n- [Upsun docs]($UPSUN_ENV_URL)" > pr_comment.txt
echo -e "Your Upsun Fixed environment has successfully deployed. :rocket:\n\nSee the site:\n\n- [Upsun Fixed docs]($ENV_URL)" > pr_comment.txt

- name: Post PR comment
uses: marocchino/sticky-pull-request-comment@v2
Expand All @@ -295,8 +266,7 @@ jobs:
- id: redirection-tests
uses: ./.github/actions/redirection-verification
with:
environment_url: ${{ needs.get_pr_url.outputs.pr_url_upsun }}
base_environment_url: ${{ needs.get_pr_url.outputs.pr_url }}
environment_url: ${{ needs.get_pr_url.outputs.pr_url }}
redirection_project_id: ${{ secrets.REDIRECTIONIO_PROJECT_ID }}
redirection_token: ${{ secrets.REDIRECTIONIO_API_KEY }}

Expand Down Expand Up @@ -361,8 +331,6 @@ jobs:
include:
- site: platformsh
url: ${{ needs.get_pr_url.outputs.pr_url }}
- site: upsun
url: ${{ needs.get_pr_url.outputs.pr_url_upsun }}
steps:
- uses: actions/checkout@v4
if: env.REPOSOURCE == 'source'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scheduled-check-links.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
run: |
# default URLs we want to check
# todo: replace this with a vars.VAL ?
urls="[\"https://fixed.docs.upsun.com\",\"https://docs.upsun.com\"]"
urls="[\"https://fixed.docs.upsun.com\"]"
if [ "workflow_dispatch" = "${{ github.event_name }}" ]; then
# make sure there's no extra spaces in what we were given
inputURL=$(echo "${{ inputs.url }}" | xargs)
Expand Down
142 changes: 0 additions & 142 deletions .platform/applications.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,148 +100,6 @@

size: S

- # The name of this application, which must be unique within a project.
name: 'upsun'

# The type key specifies the language and version for your application.
type: 'nodejs:20'

# Specify the Hugo version as an env variable.
variables:
env:
HUGOVERSION: 0.139.4
SITE_DIR: 'sites/upsun'

build:
flavor: none

source:
root: "/"

relationships:
search: "search:http"

# The hooks that will be triggered when the package is deployed.
hooks:
# Build hooks can modify the application files on disk but not access any services like databases.
build: |
#copy API docs into correct location
# @todo once api docs are fully moved we can alter the template.hbs file so style.css can be in /api

# Public API Docs
mkdir -p "${PLATFORM_APP_DIR}/${SITE_DIR}/public/api/styles"
if [ -f "${PLATFORM_APP_DIR}/shared/pages/api.html" ]; then
# @todo refactor so we're not copying over the old platform.sh api docs as well or just remove them
cp -a "${PLATFORM_APP_DIR}/shared/pages/." "${PLATFORM_APP_DIR}/${SITE_DIR}/public/api/"
mv "${PLATFORM_APP_DIR}/${SITE_DIR}/public/api/api.html" "${PLATFORM_APP_DIR}/${SITE_DIR}/public/api/index.html"
cp "${PLATFORM_APP_DIR}/shared/pages/api-style.css" "${PLATFORM_APP_DIR}/${SITE_DIR}/public/api/styles/style.css"
else
echo "<p>Currently under maintenance. Please check back later.</p>" >> "${PLATFORM_APP_DIR}/${SITE_DIR}/public/api/index.html"
fi

# Internal API Docs
mkdir -p "${PLATFORM_APP_DIR}/${SITE_DIR}/public/api-internal/styles"
if [ -f "${PLATFORM_APP_DIR}/shared/pages/api-internal.html" ]; then
# @todo refactor so we're not copying over the old platform.sh api docs as well or just remove them
cp -a "${PLATFORM_APP_DIR}/shared/pages/." "${PLATFORM_APP_DIR}/${SITE_DIR}/public/api-internal/"
mv "${PLATFORM_APP_DIR}/${SITE_DIR}/public/api-internal/api-internal.html" "${PLATFORM_APP_DIR}/${SITE_DIR}/public/api-internal/index.html"
cp "${PLATFORM_APP_DIR}/shared/pages/api-style.css" "${PLATFORM_APP_DIR}/${SITE_DIR}/public/api-internal/styles/style.css"
else
echo "<p>Currently under maintenance. Please check back later.</p>" >> "${PLATFORM_APP_DIR}/${SITE_DIR}/public/api-internal/index.html"
fi

cd $SITE_DIR
cp ../../themes/psh-docs/postcss.config.js .
npm install
npm run build
./build_docs.sh
# temporary generation of json version of public regions + ip addresses
# if this is still here after 20250621 ping @gilzow and ask why
cat "${PLATFORM_APP_DIR}/shared/data/regions.yaml" | python3 -c 'import sys,yaml,json; print(json.dumps(yaml.safe_load(str(sys.stdin.read()))))' | jq '[.. | objects | .outbound_ips? // empty] | add' > "${PLATFORM_APP_DIR}/${SITE_DIR}/public/outbound_ips.json"

deploy: |
cd $SITE_DIR
./deploy.sh
bash ./marker.sh "deployed" "${SITE_DIR}"
post_deploy:
cd $SITE_DIR && bash ./marker.sh "post_deploy" "${SITE_DIR}"
# The configuration of the application when it is exposed to the web.
web:
commands:
# Run (404) error
start: cd $SITE_DIR && node index.js
locations:
'/':
# The public directory of the application relative to its root.
root: 'sites/upsun/public'
passthru: true
index: ['index.html']
scripts: false
allow: true
expires: 24h
rules:
\.(css|js|gif|jpe?g|png|ttf|eot|woff2?|otf|cast|mp4|json|yaml|ico|svg?|cast|mp4|json|yaml|svg?|ttf)$:
expires: 4w
\.md$:
headers:
Content-Type: "text/markdown; charset=UTF-8"
\.txt$:
headers:
Content-Type: "text/plain; charset=UTF-8"
'^/favicon.ico$':
allow: true
passthru: '/images/favicon.ico'
'/api':
root: 'sites/upsun/public/api'
index: [ 'index.html' ]
expires: 24h
'/api-internal':
root: 'sites/upsun/public/api-internal'
index: [ 'index.html' ]
expires: 24h

disk: 1024

mounts:
"sites/upsun/public/scripts/xss/dist/config":
source: local
source_path: "sites/upsun/config"

size: S
-
name: redirectionio-upsun
source:
root: upsun-redirectionio
type: golang:1.15
hooks:
build: |
set -ex
curl -s -J -L "https://packages.redirection.io/dist/stable/2/any/redirectionio-agent-latest_any_amd64.tar.gz" | tar -C /app/ -xzpf -
web:
upstream:
socket_family: tcp
protocol: http
commands:
start: |
set -ex
/app/redirection-agent/redirectionio-agent -config-file ./agent.yaml
locations:
/:
allow: false
passthru: true
relationships:
app: "upsun:http"
disk: 256
mounts:
# rules will be saved locally in this folder
'rules':
source: local
source_path: rules
# redirection.io log folder
'log':
source: local
source_path: log

-
name: redirectionio-psh
source:
Expand Down
16 changes: 8 additions & 8 deletions .platform/routes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ https://{default}/:
# upstream: redirectionio-agent:http
# id: redirectionio

https://docs.upsun.com/:
type: upstream
upstream: 'redirectionio-upsun:http'
id: upsun
cache:
enabled: true
ssi:
enabled: false
# https://docs.upsun.com/:
# type: upstream
# upstream: 'redirectionio-upsun:http'
# id: upsun
# cache:
# enabled: true
# ssi:
# enabled: false

https://docs.platform.sh/:
type: redirect
Expand Down
Loading
Loading