Skip to content

Build and deploy #15305

Build and deploy

Build and deploy #15305

Workflow file for this run

# Copyright 2023 Google LLC
#
# Licensed 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
#
# https://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 and deploy'
on:
schedule:
# Run hourly at xx:05.
- cron: '05 * * * *'
push:
branches:
- main
workflow_dispatch:
jobs:
build-website:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
- name: Set up Node.js
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version-file: '.nvmrc'
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Update last known good versions per channel
run: |
git config user.name 'Chrome for Testing bot'
git config user.email 'mathias+cft@chromium.org'
git add data
git commit data -m 'Update latest available version numbers' || true
git push
- name: Deploy to gh-pages
uses: JamesIves/github-pages-deploy-action@ec9c88baef04b842ca6f0a132fd61c762aa6c1b0 # v4.6.0
with:
branch: gh-pages
folder: dist
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
single-commit: true
git-config-name: Chrome for Testing bot
git-config-email: mathias+cft@chromium.org