Skip to content

Commit

Permalink
fix preview workflow, surely
Browse files Browse the repository at this point in the history
  • Loading branch information
kilbot committed Feb 21, 2023
1 parent 4ef3cbd commit f821c90
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 46 deletions.
87 changes: 42 additions & 45 deletions .github/workflows/build-web-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,63 +4,60 @@ on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
name: Build
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: true

- name: Install Node.js
uses: actions/setup-node@v3.5.1
with:
node-version: 16.x
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: true

- name: Install Node.js
uses: actions/setup-node@v3.5.1
with:
node-version: 16.x

- name: Setup Expo
uses: expo/expo-github-action@v7
with:
expo-version: latest
token: ${{ secrets.EXPO_TOKEN }}

- name: Setup Expo
uses: expo/expo-github-action@v7
with:
expo-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- name: Install NPM packages
run: YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn install
- name: Build project
run: PUBLIC_URL="https://wcpos.github.io/managed-expo/" yarn export:web

# - name: Run tests
# run: npm run test
- name: Install NPM packages
run: YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn install

- name: Build project
run: PUBLIC_URL="https://wcpos.github.io/managed-expo/" yarn export:web

# - name: Run tests
# run: npm run test

- name: Upload production-ready build files
uses: actions/upload-artifact@v3
with:
name: production-files
path: ./dist

- name: Upload production-ready build files
uses: actions/upload-artifact@v3
with:
name: production-files
path: ./dist

deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'

steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: production-files
path: ./build
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: production-files
path: ./build

- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: web-build
publish_dir: ./build
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: web-build
publish_dir: ./build
1 change: 1 addition & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
uses: expo/expo-github-action@v8
with:
expo-version: latest
eas-version: latest
token: ${{ secrets.EXPO_TOKEN }}

- name: 📦 Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@wcpos/managed-expo",
"version": "1.0.0-alpha.72",
"version": "1.0.0-alpha.73",
"main": "index.js",
"author": "kilbot <paul@kilbot.com>",
"homepage": "https://wcpos.github.io/managed-expo",
Expand Down

0 comments on commit f821c90

Please sign in to comment.