Skip to content
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
23 changes: 7 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,38 +18,30 @@ permissions: read-all
env:
# Configure analytics reporting for pub.
PUB_ENVIRONMENT: bot.github
# The Node version to use for site infra. Generally should be the latest LTS.
NODE_VERSION: '22'

jobs:
build:
name: Build site and check links
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
submodules: recursive
- uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c
with:
sdk: beta
- name: Fetch Dart packages
run: dart pub get
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'
- name: Install Node dependencies
run: pnpm install
- name: Install firebase-tools
run: curl -sL https://firebase.tools | bash
- name: Build site
run: dart run dart_site build
run: dart run dash_site build
- name: Translated (dart.cn)
run: bash tool/translator/build.sh
shell: bash
- name: Check for broken Markdown links
run: dart run dart_site check-link-references
run: dart run dash_site check-link-references
- name: Check internal site links are functional
run: dart run dart_site check-links
run: dart run dash_site check-links

deploy:
name: Deploy to production
Expand All @@ -67,7 +59,6 @@ jobs:
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
submodules: recursive
# dart.cn | https://github.com/cfug/flutter.cn/pull/1518
fetch-depth: 0
- uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c
Expand All @@ -83,7 +74,7 @@ jobs:
- name: Install Node dependencies
run: pnpm install
- name: Build site
run: dart run dart_site build --release
run: dart run dash_site build --release
- name: Translated (dart.cn)
run: bash tool/translator/build.sh
shell: bash
Expand Down
42 changes: 0 additions & 42 deletions .github/workflows/compile_archive_js.yml

This file was deleted.

6 changes: 2 additions & 4 deletions .github/workflows/compile_host_redirect_js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ permissions:
contents: write

env:
NODE_VERSION: 20
NODE_VERSION: 22

jobs:
compile_host_redirect_js:
Expand All @@ -23,8 +23,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
submodules: recursive
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
Expand All @@ -38,7 +36,7 @@ jobs:
base: main
branch: bot/update-host-redirect-min-js
add-paths: |
./src/content/assets/js/host-redirect.min.js
./site/assets/js/host-redirect.min.js
title: '[🤖bot] Update: host-redirect.min.js'
body: 'GitHub Action: [.github/workflows/compile_host_redirect_js.yml](https://github.com/cfug/dart.cn/blob/main/.github/workflows/compile_host_redirect_js.yml)'
committer: 'cfug-dev <[email protected]>'
Expand Down
26 changes: 7 additions & 19 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ permissions: read-all
env:
# Configure analytics reporting for pub.
PUB_ENVIRONMENT: bot.github
# The Node version to use for site infra. Generally should be the latest LTS.
NODE_VERSION: '22'

jobs:
test:
Expand All @@ -35,80 +33,70 @@ jobs:
continue-on-error: ${{ matrix.experimental }}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
submodules: recursive
- uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c
with:
sdk: ${{ matrix.sdk }}
- name: Fetch Dart packages
run: dart pub get
continue-on-error: ${{ matrix.experimental }}
- name: Check Dart code formatting
run: dart run dart_site format-dart --check
run: dart run dash_site format-dart --check
continue-on-error: ${{ matrix.experimental }}
- name: Analyze Dart code
run: dart run dart_site analyze-dart
run: dart run dash_site analyze-dart
continue-on-error: ${{ matrix.experimental }}
- name: Run Dart tests
run: dart run dart_site test-dart
run: dart run dash_site test-dart
continue-on-error: ${{ matrix.experimental }}

markdown-check:
name: Check Markdown content
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
submodules: recursive
- uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c
with:
sdk: beta
- name: Fetch Dart packages
run: dart pub get
- name: Check Markdown for any known issues
run: dart run dart_site check-markdown
run: dart run dash_site check-markdown

excerpts:
name: Check if code excerpts are up to date
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
submodules: recursive
- uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c
with:
sdk: beta
- name: Fetch Dart packages
run: dart pub get
- name: Check if excerpts are up to date
run: dart run dart_site refresh-excerpts --fail-on-update --dry-run
run: dart run dash_site refresh-excerpts --fail-on-update --dry-run

site-variable-scanner:
name: Check if text can be replaced with site variables
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
submodules: recursive
- uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c
with:
sdk: beta
- name: Fetch Dart packages
run: dart pub get
- name: Check if text can be replaced with site variables
run: dart run dart_site check-site-variable
run: dart run dash_site check-site-variable

firebase-validate:
name: Validate Firebase configuration
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
submodules: recursive
- uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c
with:
sdk: beta
- name: Fetch Dart packages
run: dart pub get
- name: Validate the firebase.json file
run: dart run dart_site verify-firebase-json
run: dart run dash_site verify-firebase-json
4 changes: 0 additions & 4 deletions .gitmodules

This file was deleted.

14 changes: 6 additions & 8 deletions .idx/dev.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
# see: https://firebase.google.com/docs/studio/customize-workspace
{ pkgs, ... }: {
# Which nixpkgs channel to use.
channel = "stable-24.11"; # or "unstable"
channel = "stable-25.05";

# Use https://search.nixos.org/packages to find packages
packages = [
pkgs.nodejs_22
pkgs.pnpm
# Node is included for deploying to Firebase.
pkgs.nodejs_24
];

# Sets environment variables in the workspace
Expand All @@ -24,7 +24,7 @@
enable = true;
previews = {
web = {
command = ["./dash_site" "serve"];
command = ["dart" "run" "dash_site" "serve"];
manager = "web";
env = {
# Environment variables to set for your server
Expand All @@ -38,13 +38,11 @@
workspace = {
# Runs when a workspace is first created
onCreate = {
get-submodule = "git submodule update --init --recursive";
pnpm-install = "pnpm install";
dart-pub-get = "dart pub get";
};
# Runs when the workspace is (re)started
onStart = {
# Example: start a background task to watch and re-build backend code
# watch-backend = "npm run watch-backend";
dart-pub-get = "dart pub get";
};
};
};
Expand Down
1 change: 0 additions & 1 deletion .nvmrc

This file was deleted.

2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ the [GitHub Actions][] CI build will fail.
Just update the PR, and GitHub Actions will run again.

If you followed the setup in the README,
you can instead run `dart run dart_site refresh-excerpts`
you can instead run `dart run dash_site refresh-excerpts`
from the root directory of the repository to update the Markdown files.

[GitHub Actions]: https://docs.github.com/actions/learn-github-actions/understanding-github-actions
Expand Down
Loading