From 5b581a54aa10cff9ccb43da17cf4e51af5de0d39 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sun, 7 Jan 2024 01:57:55 +0800 Subject: [PATCH] add docs config actions --- .github/workflows/update-docs-config.yml | 42 ++++++++++++++++++++++++ config/ext.json | 2 +- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/update-docs-config.yml diff --git a/.github/workflows/update-docs-config.yml b/.github/workflows/update-docs-config.yml new file mode 100644 index 00000000..c8ef76f7 --- /dev/null +++ b/.github/workflows/update-docs-config.yml @@ -0,0 +1,42 @@ +name: Update Docs Config + +on: + push: + branches: + - main + paths: + - 'config/**.json' + +jobs: + update-docs-config: + name: "Update Docs Config" + runs-on: ubuntu-latest + if: secrets.DOCS_REPO_TOKEN != '' + steps: + - name: "Checkout static-php-cli" + uses: actions/checkout@v4 + with: + ref: main + path: static-php-cli + + - name: "Checkout static-php-cli-docs" + uses: actions/checkout@v4 + with: + repository: static-php/static-php-cli-docs + ref: master + path: static-php-cli-docs + + - name: "Set up Git" + run: | + git config --global user.email "actions@github.com" + git config --global user.name "GitHub Actions" + + - name: "Copy Config Files" + run: cp -r static-php-cli/config/ static-php-cli-docs/docs/.vitepress/config/ + + - name: "Commit and Push Changes" + run: | + cd static-php-cli-docs + git add -A + git commit -m "Sync config files from main" + git push origin master diff --git a/config/ext.json b/config/ext.json index 64c859cd..b92e1798 100644 --- a/config/ext.json +++ b/config/ext.json @@ -403,10 +403,10 @@ "sqlsrv": { "type": "external", "source": "sqlsrv", + "cpp-extension": true, "lib-depends": [ "unixodbc" ], - "cpp-extension": true, "ext-depends-linux": [ "pcntl" ]