Skip to content

Commit

Permalink
Add deploy job
Browse files Browse the repository at this point in the history
  • Loading branch information
martinezguillaume committed Apr 25, 2024
1 parent 413faa2 commit b988edb
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 19 deletions.
17 changes: 0 additions & 17 deletions .github/workflows/deploy.yml

This file was deleted.

40 changes: 38 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,41 @@ jobs:
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- run: bun install
- run: bun run test
- name: Install dependencies
run: bun install
- name: Run tests
run: bun run test

build:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: test
steps:
- name: Build web app
run: bun run expo export -p web
- name: Setup Pages
if: github.ref == 'refs/heads/main'
uses: actions/configure-pages@v3
- name: Upload Artifact
if: github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v1
with:
path: "./dist"

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

permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

0 comments on commit b988edb

Please sign in to comment.