This is an automated email from the ASF dual-hosted git repository. erisu pushed a commit to branch site/deploy-improvement in repository https://gitbox.apache.org/repos/asf/cordova-docs.git
commit a5a1c2d9a7e33f7a84dc77b5ac23e5e2efb14918 Author: Erisu <[email protected]> AuthorDate: Sat Jan 3 13:35:37 2026 +0900 ci: improve deployment for prod & staging --- .asf.yaml | 8 +++-- .github/workflows/ci.yml | 17 ++++++++++ .github/workflows/deploy-prod.yml | 68 ++++++++++++++++++++++++++++++++++++++ .github/workflows/deploy-stage.yml | 68 ++++++++++++++++++++++++++++++++++++++ .github/workflows/deploy.yml | 44 ------------------------ 5 files changed, 159 insertions(+), 46 deletions(-) diff --git a/.asf.yaml b/.asf.yaml index 7d401b08c9..dbae1a500e 100644 --- a/.asf.yaml +++ b/.asf.yaml @@ -5,9 +5,9 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -47,5 +47,9 @@ notifications: pullrequests_status: [email protected] pullrequests_comment: [email protected] +staging: + profile: ~ + whoami: asf-staging + publish: whoami: asf-site diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fca021ce7e..a7934ffc2e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,3 +1,20 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + name: build test on: [ pull_request ] diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml new file mode 100644 index 0000000000..654aa2536e --- /dev/null +++ b/.github/workflows/deploy-prod.yml @@ -0,0 +1,68 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: Deploy Prod Site + +on: + workflow_dispatch: + inputs: + dispatchReason: + description: 'Reason of Manual Deploy' + required: true + default: 'Re-run failed deployment' + + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + + permissions: + contents: read + contents: write + + steps: + - uses: actions/checkout@v6 + with: + ref: master + + - uses: actions/setup-node@v6 + with: + node-version: 24.x + + # v1.278.0 + - uses: ruby/setup-ruby@4c24fa5ec04b2e79eb40571b1cee2a0d2b705771 + with: + ruby-version: 2.7 + bundler-cache: true + + - name: Run npm install-ci-test (cit) + run: npm install-ci-test + + - name: Run build + run: npm run build:prod + + # v4.7.4 + - name: Run deploy + uses: JamesIves/github-pages-deploy-action@4a3abc783e1a24aeb44c16e869ad83caf6b4cc23 + with: + branch: asf-site + folder: build-prod + clean-exclude: | + archive diff --git a/.github/workflows/deploy-stage.yml b/.github/workflows/deploy-stage.yml new file mode 100644 index 0000000000..9ee41ac55d --- /dev/null +++ b/.github/workflows/deploy-stage.yml @@ -0,0 +1,68 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: Deploy Staging Site + +on: + workflow_dispatch: + inputs: + dispatchReason: + description: 'Reason of Manual Deploy' + required: true + default: 'Re-run failed deployment' + + push: + branches: + - staging + +jobs: + build: + runs-on: ubuntu-latest + + permissions: + contents: read + contents: write + + steps: + - uses: actions/checkout@v6 + with: + ref: staging + + - uses: actions/setup-node@v6 + with: + node-version: 24.x + + # v1.278.0 + - uses: ruby/setup-ruby@4c24fa5ec04b2e79eb40571b1cee2a0d2b705771 + with: + ruby-version: 2.7 + bundler-cache: true + + - name: Run npm install-ci-test (cit) + run: npm install-ci-test + + - name: Run build + run: npm run build:prod + + # v4.7.4 + - name: Run deploy + uses: JamesIves/github-pages-deploy-action@4a3abc783e1a24aeb44c16e869ad83caf6b4cc23 + with: + branch: asf-staging + folder: build-prod + clean-exclude: | + archive diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index 9e0a77f4f8..0000000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: deploy site - -on: - workflow_dispatch: - inputs: - dispatchReason: - description: 'Reason of Manual Deploy' - required: true - default: 'Re-run failed deployment' - - push: - branches: [ master ] - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 22.x - - uses: ruby/setup-ruby@v1 - with: - ruby-version: 2.7 - bundler-cache: true - - - name: Run npm install - run: npm install - - - name: Run npm test - run: npm test - - - name: Run build - run: npm run build:prod - - # v4.7.3 - - name: Run deploy - uses: JamesIves/github-pages-deploy-action@6c2d9db40f9296374acc17b90404b6e8864128c8 - with: - branch: asf-site - folder: build-prod - clean-exclude: | - archive --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
