-
Notifications
You must be signed in to change notification settings - Fork 334
42 lines (37 loc) · 1.47 KB
/
generate-cli-commands-page.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Generate CLI commands doc page
on: [pull_request]
# pull_request:
# branches: [main]
# types: [labeled,opened,unlabeled,synchronize]
env:
PLATFORMSH_CLI_NO_INTERACTION: 1
PLATFORM_PROJECT: ${{ vars.PROJECT_ID }}
PLATFORMSH_CLI_DEFAULT_TIMEOUT: 60 # Increase timeout for CLI commands
SLEEP_TIME: 5
NUM_TRIES: 30
BRANCH_TITLE: ${{ vars.BFF_PREFIX }}-${{ github.event.number }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
token: ${{ secrets.WORKFLOW_TOKEN }}
# Set up workflow environment to use the Platform.sh CLI
- name: Set up Platform.sh CLI
uses: ./.github/actions/set-up-cli
# Set up workflow environment to use the Upsun CLI
- name: Set up Upsun CLI
uses: ./.github/actions/set-up-upsun-cli
# Generate CLI command doc pages
- env:
PLATFORMSH_CLI_TOKEN: ${{ secrets.PLATFORMSH_CLI_TOKEN }}
# @see activate_environment:Set environment title:env in manage-environment.yaml
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
env | grep PLATFORMSH_CLI_TOKEN
PLATFORMSH_CLI_TOKEN=${{ secrets.PLATFORMSH_CLI_TOKEN }} platform list --format=md > platform-commands.html
git add platform-commands.html
git commit -m "generating Platform CLI command doc page"
git push --force origin ${{ env.BRANCH_TITLE }}