Skip to content

Commit

Permalink
fix: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
RPDeshaies committed Jan 2, 2024
1 parent 502737f commit 0767a37
Showing 1 changed file with 2 additions and 61 deletions.
63 changes: 2 additions & 61 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,70 +47,11 @@ jobs:
with:
name: dist
path: dist
deploy-preview:
needs: [build]
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/master' && github.event.repository.fork == false
environment:
name: Preview
url: https://${{github.run_id}}--fari.netlify.app
steps:
# Setup
- uses: actions/checkout@v2
- name: Use Node
uses: actions/setup-node@v2
with:
node-version: "18"
# Cache
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
# Install
- name: Install
run: npm install
# Download Artifacts
- name: Download Artifacts
uses: actions/download-artifact@master
with:
name: dist
path: dist
# Deploy Preview
- name: Deploy Preview
if: github.ref != 'refs/heads/master' && github.event.repository.fork == false
run: npm run deploy:preview -- --auth ${{secrets.NETLIFY_AUTH_TOKEN}} --alias $GITHUB_RUN_ID
deploy-production:
needs: [build]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' && github.event.repository.fork == false
environment:
name: Production
url: https://fari.app
steps:
# Setup
- uses: actions/checkout@v2
- name: Use Node
uses: actions/setup-node@v2
with:
node-version: "18"
# Cache
- name: Cache
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
# Install
- name: Install
run: npm install
# Download Artifacts
- name: Download Artifacts
uses: actions/download-artifact@master
with:
name: dist
path: dist
# Deploy Production
- name: Deploy Production
if: github.ref == 'refs/heads/master' && github.event.repository.fork == false
run: npm run deploy:prod -- --auth ${{secrets.NETLIFY_AUTH_TOKEN}}

0 comments on commit 0767a37

Please sign in to comment.