This is an automated email from the ASF dual-hosted git repository.
asorokoumov pushed a commit to branch website-poc-from-asf-template
in repository https://gitbox.apache.org/repos/asf/otava-website.git
The following commit(s) were added to refs/heads/website-poc-from-asf-template
by this push:
new e863874 Add CI
e863874 is described below
commit e86387402bb645c4ec9f8865e0811da2cf8e283d
Author: Alex Sorokoumov <[email protected]>
AuthorDate: Sat Mar 22 17:22:00 2025 -0700
Add CI
---
.github/workflows/ci.yml | 45 ++++++++++++++++++++++++++++++++++++++++++++
.github/workflows/deploy.yml | 44 +++++++++++++++++++++++++++++++++++++++++++
2 files changed, 89 insertions(+)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..88071e5
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,45 @@
+# 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: CI
+on:
+ pull_request:
+ branches: [master]
+ push:
+ branches: [master]
+
+# Concurrency strategy:
+# github.workflow: distinguish this workflow from others
+# github.event_name: distinguish `push` event from `pull_request` event
+# github.event.number: set to the number of the pull request if
`pull_request` event
+# github.run_id: otherwise, it's a `push` event, only cancel if we rerun the
workflow
+#
+# Reference:
+# https://docs.github.com/en/actions/using-jobs/using-concurrency
+#
https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event_name }}-${{
github.event.number || github.run_id }}
+ cancel-in-progress: true
+
+jobs:
+ check:
+ name: Check
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: korandoru/hawkeye@v4
+# TODO: enable markdownlint & typos
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
new file mode 100644
index 0000000..51b1740
--- /dev/null
+++ b/.github/workflows/deploy.yml
@@ -0,0 +1,44 @@
+# 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
+
+on:
+ push:
+ branches: [master]
+ pull_request:
+
+jobs:
+ deploy:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-node@v4
+ with:
+ node-version: 18.x
+ - uses: pnpm/action-setup@v2
+ with:
+ version: 8
+ - run: pnpm install
+ - run: pnpm run build
+ - run: cp .asf.yaml build/.asf.yaml
+ - uses: peaceiris/actions-gh-pages@v3
+ if: github.event_name != 'pull_request'
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ publish_dir: ./build
+ publish_branch: asf-site