Skip to content

Commit

Permalink
Merge branch 'main' into fix-1789
Browse files Browse the repository at this point in the history
  • Loading branch information
atsansone authored Jan 11, 2024
2 parents 6ebee51 + 3fbdf68 commit 20dc96b
Show file tree
Hide file tree
Showing 59 changed files with 5,903 additions and 3,254 deletions.
114 changes: 0 additions & 114 deletions .github/workflows/build.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@012739e5082ff0c22ca6d6ab32e07c36df03c4a4
uses: github/codeql-action/init@e5f05b81d5b6ff8cfa111c80c22c5fd02a384118
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -44,7 +44,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@012739e5082ff0c22ca6d6ab32e07c36df03c4a4
uses: github/codeql-action/autobuild@e5f05b81d5b6ff8cfa111c80c22c5fd02a384118

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -58,4 +58,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@012739e5082ff0c22ca6d6ab32e07c36df03c4a4
uses: github/codeql-action/analyze@e5f05b81d5b6ff8cfa111c80c22c5fd02a384118
57 changes: 57 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# This GitHub workflow has been disabled and is no longer used.
# Website deploys are now done through Cloud Build.
# See https://github.com/dart-lang/site-www/pull/5447
name: deploy

on:
# Run on pushes to the default branch.
push:
branches:
- main
schedule:
- cron: "0 0 * * 0"

# Declare default permissions as read only.
permissions: read-all

env:
# Keep for Dart SDK reporting
PUB_ENVIRONMENT: bot.github
# LTS
NODE_VERSION: '20'
# Tool location
BASE_DIR: ${{ github.workspace }}
TOOL_DIR: ${{ github.workspace }}/tool

jobs:
deploy:
name: Deploy production site to Firebase hosting
permissions:
checks: write
pull-requests: write
if: ${{ github.event_name == 'push' &&
github.ref == 'refs/heads/main' &&
github.repository == 'dart-lang/site-www' }}
runs-on: ubuntu-latest
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
FIREBASE_PROJECT: default
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
submodules: recursive
- run: make build
- run: make write-prod-robots
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8
with:
node-version: ${{ env.NODE_VERSION }}
- run: npm install -g [email protected]
- uses: dart-lang/setup-dart@ca7e6fee45ffbd82b555a7ebfc236d2c86439f5b
with:
sdk: stable
- uses: FirebaseExtended/action-hosting-deploy@120e124148ab7016bec2374e5050f15051255ba2
with: # TODO(khanhnwin/drewroen): Migrate deploy to Cloud Build
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_DART_DEV }}'
projectId: dart-dev
channelId: live
2 changes: 1 addition & 1 deletion .github/workflows/scorecards-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@012739e5082ff0c22ca6d6ab32e07c36df03c4a4
uses: github/codeql-action/upload-sarif@e5f05b81d5b6ff8cfa111c80c22c5fd02a384118
with:
sarif_file: results.sarif
66 changes: 66 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: test

on:
# Run on PRs and pushes to the default branch.
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: "0 0 * * 0"

# Declare default permissions as read only.
permissions: read-all

env:
# Keep for Dart SDK reporting
PUB_ENVIRONMENT: bot.github
# LTS
NODE_VERSION: '20'
# Tool location
BASE_DIR: ${{ github.workspace }}
TOOL_DIR: ${{ github.workspace }}/tool

jobs:
test:
name: Check excerpts and run tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- sdk: beta
experimental: false
- sdk: stable
experimental: false
continue-on-error: ${{ matrix.experimental }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
submodules: recursive
- uses: dart-lang/setup-dart@ca7e6fee45ffbd82b555a7ebfc236d2c86439f5b
with:
sdk: ${{ matrix.sdk }}
- run: dart pub get
- run: tool/test.sh
env:
DART_CHANNEL: ${{ matrix.sdk }}

linkcheck:
name: Build site and check links
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
submodules: recursive
- run: make build
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8
with:
node-version: ${{ env.NODE_VERSION }}
- run: npm install -g [email protected]
- uses: dart-lang/setup-dart@ca7e6fee45ffbd82b555a7ebfc236d2c86439f5b
with:
sdk: stable
- run: tool/check-links.sh
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ More info:

## Updating code samples

If your PR changes Dart code within a page,
If your PR changes Dart code within a page,
you'll probably need to change the code in two places:

1. In a `.md` file for the page.
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ RUN BUNDLE_WITHOUT="test production" bundle install --jobs=4 --retry=2

ENV NODE_ENV=development
COPY package.json package-lock.json ./
RUN npm install -g firebase-tools@12.8.1
RUN npm install -g firebase-tools@13.0.2
RUN npm install

COPY ./ ./
Expand Down Expand Up @@ -159,7 +159,7 @@ RUN bundle exec jekyll build --config $BUILD_CONFIGS

# ============== DEPLOY to FIREBASE ==============
FROM build as deploy
RUN npm install -g firebase-tools@12.8.1
RUN npm install -g firebase-tools@13.0.2
ARG FIREBASE_TOKEN
ENV FIREBASE_TOKEN=$FIREBASE_TOKEN
ARG FIREBASE_PROJECT=default
Expand Down
20 changes: 20 additions & 0 deletions cloud_build/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
steps:
- name: gcr.io/cloud-builders/git
args: ['submodule', 'update', '--init', '--recursive']
- name: gcr.io/cloud-builders/docker
entrypoint: '/bin/bash'
args:
- '-c'
- |-
set -e
echo "Building the website using a makefile..."
make build
make write-prod-robots
- name: gcr.io/flutter-dev-230821/firebase-ghcli
entrypoint: '/bin/bash'
args:
- '-c'
- |-
firebase deploy --project=dart-dev --only=hosting
options:
logging: CLOUD_LOGGING_ONLY
2 changes: 1 addition & 1 deletion cloud_build/stage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ steps:
echo "Building the website using a makefile..."
make build
- name: gcr.io/flutter-dev-230821/firebase-staging
- name: gcr.io/flutter-dev-230821/firebase-ghcli
entrypoint: '/bin/bash'
args:
- '-c'
Expand Down
8 changes: 4 additions & 4 deletions diagrams/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

This directory contains sources for generating images used across the website.

These come in various forms, such as
`.graffle` used by the [OmniGraffle][] tool
These come in various forms, such as
`.graffle` used by the [OmniGraffle][] tool
as well as PNGs and SVGs generated with [diagrams.net][].

Do **NOT** optimize any images or vectors that are in this directory.
Do **NOT** optimize any images or vectors that are in this directory.
They contain metadata used by editors to enable editing the image.

[OmniGraffle]: https://www.omnigroup.com/omnigraffle/
[diagrams.net]: https://www.diagrams.net/
[diagrams.net]: https://www.diagrams.net/
Loading

0 comments on commit 20dc96b

Please sign in to comment.