-
Notifications
You must be signed in to change notification settings - Fork 99
50 lines (50 loc) · 1.47 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Build and Publish
on:
push:
branches: [main]
jobs:
build_and_publish:
name: "Build and publish"
permissions:
contents: write # deploy to GitHub Pages (peaceiris/actions-gh-pages)
if: ${{ github.repository == 'microsoft/rnx-kit' }}
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup the toolchain
uses: ./.github/actions/setup-toolchain
- name: Install package dependencies
run: |
yarn
- name: Build and test packages
run: |
yarn build:ci:all
- name: Bundle packages
run: |
yarn bundle
- name: Install package dependencies (docsite)
run: |
yarn
working-directory: docsite
- name: Build website
run: |
yarn build
working-directory: docsite
- name: Create release PR or publish to npm
uses: changesets/action@v1
with:
publish: yarn publish:changesets
version: yarn version:changesets
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Deploy website
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docsite/build
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com