Repository navigation
51 lines (43 loc) · 1.72 KB
/
Copy pathdocs.yml
File metadata and controls
51 lines (43 loc) · 1.72 KB
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
51
name: Deploy docs
on:
# Run by hand for documentation-only changes.
workflow_dispatch:
branches:
- main
# Called by the release workflow after a release from main.
workflow_call:
jobs:
deploy-docs:
if: ${{ contains(fromJSON('["shopify/react-native-skia", "wcandillon/react-native-skia"]'), github.repository) }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v5.0.0
with:
submodules: recursive
- name: Setup
uses: ./.github/actions/setup
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# The setup already installed the whole workspace, apps/docs included.
- name: Build Documentation
working-directory: apps/docs
run: yarn build
- name: Include frozen v2 documentation
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v5.0.0
with:
ref: docs-v2
path: apps/docs/build/v2
- name: Remove v2 checkout metadata
run: rm -rf apps/docs/build/v2/.git
# shopify.github.io only serves redirects to the docs hosted on wcandillon.github.io
- name: Replace site with redirects
if: ${{ github.repository_owner == 'shopify' }}
run: node apps/docs/scripts/redirect-site.mjs apps/docs/build https://wcandillon.github.io
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./apps/docs/build
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com