Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 34 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---

name: CI

on:
Expand All @@ -12,14 +11,23 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
cache: npm
node-version-file: .tool-versions

- id: cache
name: Cache
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might as well use it everywhere since we already are using it below.

uses: actions/cache@v4
with:
node-version: 14
path: ./node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}

- name: Install
- if: steps.cache.outputs.cache-hit != 'true'
name: Install
run: npm ci

- name: Lint
Expand All @@ -31,17 +39,26 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 14
cache: npm
node-version-file: .tool-versions

- name: Setup Markdown
uses: xt0rted/markdownlint-problem-matcher@v1

- name: Install
- id: cache
name: Cache
uses: actions/cache@v4
with:
path: ./node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}

- if: steps.cache.outputs.cache-hit != 'true'
name: Install
run: npm ci

- name: Lint
Expand All @@ -52,23 +69,24 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: 14
cache: npm
node-version-file: .tool-versions

- name: Cache
id: cache
- id: cache
name: Cache
uses: actions/cache@v4
with:
path: ./node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}

- name: Install
- if: steps.cache.outputs.cache-hit != 'true'
name: Install
run: npm ci
if: steps.cache.outputs.cache-hit != 'true'

- name: Build
run: npm run build
48 changes: 30 additions & 18 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---

name: Deploy

on:
Expand All @@ -8,41 +7,54 @@ on:
- master

jobs:
Deploy:
Build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
uses: actions/checkout@v4

- name: Setup
uses: actions/setup-node@v2
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 14
cache: npm
node-version-file: .tool-versions

- name: Cache
id: cache
- id: cache
name: Cache
uses: actions/cache@v4
with:
path: ./node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}

- name: Install
- if: steps.cache.outputs.cache-hit != 'true'
name: Install
run: npm ci
if: steps.cache.outputs.cache-hit != 'true'

- name: Build
run: npm run build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_ENV: production

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
- name: Upload
uses: actions/upload-pages-artifact@v3
with:
cname: support.system76.com
github_token: ${{ secrets.RELEASE_TOKEN }}
publish_dir: ./dist
force_orphan: true
path: dist/

Deploy:
needs: Build
runs-on: ubuntu-latest

permissions:
pages: write
id-token: write

environment:
name: Support
url: ${{ steps.deployment.outputs.page_url }}

steps:
- id: deployment
name: Deploy
uses: actions/deploy-pages@v4
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodejs 16.16.0
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Supports things like mise, asdf, and the setup-node action. This is the latest supported version of node that works (all of the dependencies are pretty out of date)