Serial can't keep up on spherion and tomato (MediaTek Chromebooks) #83
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Hugo Staging Deploy | |
on: | |
issue_comment: | |
types: [created, edited] | |
workflow_dispatch: | |
inputs: | |
environment: | |
description: 'Environment to deploy to' | |
required: true | |
default: 'staging' | |
jobs: | |
deploy_staging: | |
if: | | |
(github.event.issue.pull_request && contains('["nuclearcat","JenySadadia","a-wai","broonie","padovan"]', github.actor) && contains(github.event.comment.body, '/staging')) || | |
github.event_name == 'workflow_dispatch' && contains('["nuclearcat","JenySadadia","a-wai","broonie","padovan"]', github.actor) | |
runs-on: ubuntu-22.04 | |
environment: stagingdeploy | |
steps: | |
- name: Checkout PR branch | |
uses: actions/checkout@v4 | |
if: github.event_name == 'issue_comment' | |
with: | |
submodules: recursive # Fetch Hugo themes (true OR recursive) | |
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod | |
lfs: true # Fetch Git LFS files | |
ref: refs/pull/${{ github.event.issue.number }}/head | |
- name: Checkout main branch | |
uses: actions/checkout@v4 | |
if: github.event_name == 'workflow_dispatch' | |
with: | |
submodules: recursive # Fetch Hugo themes (true OR recursive) | |
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod | |
lfs: true # Fetch Git LFS files | |
ref: main | |
# TODO: Fix this more elegantly | |
- name: Submodules init | |
run: git submodule update --init --recursive | |
- name: Update submodule kernelci-pipeline | |
run: cd kernelci.org/external/kernelci-pipeline;git pull origin main | |
- name: Update submodule kernelci-api | |
run: cd kernelci.org/external/kernelci-api;git pull origin main | |
- name: Update submodule kernelci-core | |
run: cd kernelci.org/external/kernelci-core;git pull origin main | |
- name: Update submodule kcidb | |
run: cd kernelci.org/external/kcidb;git pull origin main | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v3 | |
with: | |
hugo-version: '0.97.3' | |
extended: true | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: Install dependencies (postcss), bootstrap-sass | |
run: npm install --save-dev autoprefixer && npm install postcss-cli && npm install -D postcss && npm install -D postcss-preset-env && npm install -D bootstrap-sass | |
- name: Build | |
run: cd kernelci.org;hugo --minify -D -F -b https://static.staging.kernelci.org/ | |
- name: Deploy via SCP | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.WEB_STAGING_HOST }} | |
username: ${{ secrets.WEB_STAGING_USERNAME }} | |
key: ${{ secrets.WEB_STAGING_KEY }} | |
port: ${{ secrets.WEB_STAGING_PORT }} | |
source: "kernelci.org/public/" | |
target: ${{ secrets.WEB_STAGING_DIR }} | |
strip_components: 2 |