Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add github pages workflow #6992

Merged
merged 3 commits into from
Jun 17, 2024
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/cd-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Deploy GitHub Pages

on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node: [16.x]

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

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo '::set-output name=dir::$(yarn cache dir)'

- name: Set up node_modules cache
uses: actions/cache@v3
id: yarn-cache
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
node_modules
*/*/node_modules
key: ${{ runner.os }}-yarn_cache-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn_cache-

- name: Install package dependencies
run: yarn install --frozen-lockfile --ignore-scripts --prefer-offline

- name: Prepare workspaces
run: yarn prepare

- name: Build GitHub Pages
run: yarn build:gh-pages

- name: Deploy GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages # The branch the action should deploy to.
folder: sites/website/build # The folder the action should deploy.
target-folder: docs # The folder on the branch to deploy to.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"change": "beachball change",
"checkchange": "beachball check --scope \"!sites/*\" --changehint \"Run 'yarn change' to generate a change file\"",
"check": "beachball check ",
"build:gh-pages": "yarn workspace fast-site build",
"publish": "beachball publish",
"publish-ci": "beachball publish -y --access public",
"prepare": "lerna run prepare",
Expand Down
6 changes: 4 additions & 2 deletions sites/website/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
module.exports = {
title: "FAST",
tagline: "The adaptive interface system for modern web experiences",
url: "https://www.fast.design",
baseUrl: "/",
url: "https://microsoft.github.io",
baseUrl: "/fast/",
deploymentBranch: "gh-pages",
trailingSlash: false,
favicon: "/favicon.ico",
organizationName: "microsoft",
projectName: "fast",
Expand Down
Loading