forked from Ddv0623/expo
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (70 loc) · 2.52 KB
/
publish-demo.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Publish Native Component List Website & Update
on:
workflow_dispatch: {}
push:
branches:
- main
paths:
- .github/workflows/publish-demo.yml
- yarn.lock
- apps/**
- packages/**
# Ignore Expo CLI for now...
- '!packages/@expo/cli/**'
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: 👀 Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: ⬢ Setup Node
uses: actions/setup-node@v3
with:
node-version: '14.17'
- name: ♻️ Restore caches
uses: ./.github/actions/expo-caches
id: expo-caches
with:
yarn-workspace: 'true'
git-lfs: 'true'
- name: 🚚 Pull Git LFS files
run: git lfs pull
- name: Setup Expo
uses: expo/expo-github-action@v7
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.COMMUNITY_EXPO_ACCESS_TOKEN }}
- name: 🧶 Install workspace node modules
if: steps.expo-caches.outputs.yarn-workspace-hit != 'true'
run: yarn install --frozen-lockfile
- name: Publish update
working-directory: ./apps/native-component-list
run: EXPO_SDK_VERSION=45.0.0 eas update --branch main --message "Publishing ${{ github.sha }}"
- name: 🏗️ Build the NCL website
working-directory: ./apps/native-component-list
run: yarn build:web
# - name: 🌐 Publish NCL website
# working-directory: ./apps/native-component-list
# env:
# ZEIT_TOKEN: ${{ secrets.ZEIT_TOKEN }}
# BUILD_ID: ${{ github.sha }}
# run: npx now deploy web-build --env NODE_ENV=production --confirm --public --no-clipboard --token=${ZEIT_TOKEN} > deploy-url.txt
# - name: ➕ Add deploy url to GITHUB_ENV
# run: echo "ZEIT_DEPLOY=$(cat deploy-url.txt)" >> $GITHUB_ENV
# Alias the now deployment URL
#
# NOTE(brentvatne): this is currently disabled because aliasing is failing with:
# "Error! The alias expo-web.now.sh is a deployment URL or it's in use by a different team."
#
# - name: Alias with PR number
# working-directory: ./apps/native-component-list
# env:
# ZEIT_TOKEN: ${{ secrets.ZEIT_TOKEN }}
# SITE_ALIAS: expo-web.now.sh
# run: npx now alias --token=${ZEIT_TOKEN} `cat deploy-url.txt` $SITE_ALIAS